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.
host my.hostname.comtell you? – Tomáš Pospíšek Nov 29 '17 at 21:07host my.hostname.comis a shell command, that you need to type into a shell. – Tomáš Pospíšek Nov 29 '17 at 21:21ping -c 1 my.hostname.comthat should answer my question about whether your browser can actually resolve the namemy.hostname.com, which it needs to, in order to access your website. – Tomáš Pospíšek Nov 29 '17 at 21:36192.168.server.ip? – Tomáš Pospíšek Nov 29 '17 at 21:51