Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm extremely new at unix/linux so please bear that in mind in your answer.

I am running an apache server on a Fedora box. I have a static IP and have set up port forwarding through my router/modem - I have opened up port 80, among others, to forward to my Fedora box.

If, from an outside connection, I type my static IP, I successfully get my index page. However, if I try to type my.static.ip/subdirectory this gets instantly replaced with (my LAN IP), which of course fails if I'm on an outside connection.

Why is this remapping happening? How can I set up my server such that this remapping doesn't occur when requesting sub-pages/sub-directories from an external connection (while still working correctly if I connect to my local ip from a local LAN connection)?

share|improve this question
I suspect you're actually trying to access (without trailing slash) and it redirects you to (with trailing slash). I had this once, but I don't remember how I fixed this, so currently, I can't answer it for you. But this bit of information is relevant for people asking your question. You might want to edit the above. – Halfgaar May 5 '11 at 22:17
up vote 0 down vote accepted

You probably just need to adjust the UseCanonicalName and ServerName settings in your configuration. Either in your httpd.conf file, or in your virtual host definition file.

I believe you want to have

UseCanonicalName Off
share|improve this answer
Thanks, that did it! For others who are noobs like me, you'll find httpd.conf here /etc/httpd/conf/httpd.conf – Tom Auger May 10 '11 at 19:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.