Apache ServerName
I have an apache server running on one of my local computers (as in, on my LAN, behind a NAT router. I have portforwarding and all configured, and it works great for access both locally and over the internet. There's only one problem. With a servername of "lancomp", going to http://webdomain.com redirects to http://lancomp/ (adding the trailing slash). Reversing things breaks it from the LAN side. What is the reccomended practice for setting ServerName in this case? Or perhaps I should set it up for vhosts and add a ServerAlias for each name?
All thoughts are welcomed, of course. Thanks for reading this. |
I have found in the exact same situation that leaving ServerName entirely unset helps a lot. I can access the server by the private name or IP as well as using the FQDN from the outside.
Håkan |
you can get around this if you have a linux router just add an entry in your /etc/hosts file:
ipaddress lancomp If you don't have alinux router just have to do the same for hosts files in your linux and windows clients Then when someone types http://lancomp in the browser your router will redirect them to your server. Hope this helps |
All times are GMT -5. The time now is 08:51 PM. |