0

I am running Flask on a server that has Apache installed. Users are accustomed to accessing websites on the server using subdirectories such as www.domain.com/mysite.

My question is, can I make Apache show www.domain.com:5000 when www.domain.com/mysite is accessed whilst showing www.domain.com/mysite in the address bar? Up to now I have managed to create a redirection using an .htaccess file in www.domain.com/mysite but the address bar changes to www.domain.com:5000 which I would like to avoid.

I would be happy to use subdomains instead of subdirectories if it makes a difference (mysite.domain.com).

mtanti
  • 101
  • 1
    You would want to configure apache as a reverse proxy to your Flask application. This way, the visitors will not see the port in the address bar wile accessing your Flask site. – RoseHosting Dec 27 '20 at 02:04
  • @RoseHosting Got any pointers on that? I found this but I need a little more help: https://httpd.apache.org/docs/2.4/howto/reverse_proxy.html – mtanti Dec 27 '20 at 09:14

0 Answers0