1

Im using apache configured as a proxy server to connect hostnames linked to my external static IP address to ports on my internal server.

My router is configured to point to my server via port 80 using port forwarding.

My apache configuration is set to point my.hostname.com to 192.168.server.ip:8081 which hosts a web server.

<VirtualHost *:80>

   ServerName myproxy.net
   ServerAlias www.myproxy.net

   ProxyPreserveHost on
   ProxyPass / http://192.168.server.ip:8080/


</VirtualHost>

<VirtualHost *:80>

   ServerName my.hostname.com
   ServerAlias www.my.hostname.com  

   ProxyPreserveHost on
   ProxyPass / http://192.168.server.ip:8081/


</VirtualHost>

After this I had done a service apache2 reload

When I enter my.hostname.com/test.php in my browser (test.php is a file in my document root directory in a docker container that port 8081 points to) I get a 503 error.

But if I enter http://192.168.server.ip:8081/test.php into my browser I get the webpage I'm trying to reach.

Am I configuring apache wrong? or is there perhaps something I am missing?

Please note: 192.168.server.ip is not my external ip address its my local ip address to my server.

0 Answers0