0

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 [email protected]
    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 ;)

1
  • 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, 2012 at 16:09

2 Answers 2

0

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.

2
  • 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 :) Apr 3, 2012 at 15:38
  • I should add that this is the only site on this server. Apr 3, 2012 at 15:39
0

Make sure you have UseCanonicalName Off in your Apache configuration.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .