Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The problem that I am having, is that when someone goes to my domain name example.co.uk, for some reason, apache seems to be re-routing the request to the internal IP address of the server, i.e. 192.168.0.52

My Apache2 default sites enabled file is as follows:

    ServerAdmin admin@example.co.uk
    ServerName example.co.uk
    ServerAlias www.example.co.uk
    DocumentRoot /var/www

    <Directory />
            Options FollowSymLinks
            AllowOverride All
    </Directory>
    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>

    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
            AllowOverride All
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
    </Directory>

    ErrorLog /var/log/apache2/trusteeguard-error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/trusteeguard-access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
    Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

This is an Ubuntu box if that is any help ;)

share|improve this question
    
Does it happen only when you access your site from INSIDE the same LAN ? What happens when you access it from outside ? –  Sandman4 Apr 3 '12 at 16:09

2 Answers 2

Re-routing how ? You don't provide any logs or sample URLs to indicate an issue.

If you mean "shows the content from" then yes, obviously - the content doesn't change, it's still your server.

The ServerName and ServerAlias are leading, unless this is also the first vhost; in that case, all requests will land on it.

share|improve this answer
    
HI adaptr, When I say re-route, I mean that you type in the domain name, and then the address bar changes from the domain name to the ip address, which happens to be an internal address. Our firewall basically re-routes from a public facing IP to the internal. I am not a sys-admin, and our's is off sick and I have been thrown in at the deep end here, so any advice is appreciated. Thanks :) –  Richard Grey Apr 3 '12 at 15:38
    
I should add that this is the only site on this server. –  Richard Grey Apr 3 '12 at 15:39

Make sure you have UseCanonicalName Off in your Apache configuration.

http://httpd.apache.org/docs/2.0/mod/core.html#usecanonicalname

share|improve this answer

Your Answer

 
discard

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.