How to route a running Docker application to my domain

I have a Docker application running successfully on my server at the following URL: http://89.117.73.88:8200/.

I’ve also added my domain, www.askseotools.com, into same server.

Now, I would like to route my running Docker application to my domain, askseotools.

Please guide me through the steps required to achieve this.

Server Details:
OS: CentOS 7
Panel: aaPanel

Thank you.

Hi

Depends on how you want the end results to be.

If you want it to be something like:

container.askseotools.com or askseotools.com/container

you need to create a proxy that can route the traffic to the correct endpoint

Thank you @terpz

I’ve set up a reverse proxy successfully to route traffic from my server’s IP/port to the subdomain pdf.askseotools.com.

Now, I’m looking to configure it to route traffic my main domain subdirectory, askseotools.com/pdf.

When creating a new subdomain in my server’s control panel, I selected the “PHP Static” option and then set up the reverse proxy.

if I change my main domain’s configuration from PHP to static, my main website will stop working.

It would be helpful to know which reverse proxy you are using. I use HAProxy but there are countless others including Nginx, Unit or Apache can also be used as a reverse proxy. And the configuration is different for everyone.

And of course if you switch from PHP to static and you have a dynamic page with PHP, then it can no longer work. But why should it be necessary to set it to static?

Forwarding to a Docker container on a subdomain in the aaPanel with the reverse proxy seems to work. But whether you can also forward to a subfolder of the main domain is not quite clear to me.

Normally it should be possible with a reverse proxy, even if you can’t do it in the aaPanel.

But you should perhaps ask directly in the forum for aaPanel.