URL going to wrong site
I've made a new vhost file in sites-available:
<virtualhost 178.79.183.119:81=""># Postfix admin
Alias /postfixadmin /srv/www/postfixadmin
# blog
ServerAdmin chris@pixelatedphotographer.com
ServerName standingstart.net
ServerAlias www.standingstart.net
DocumentRoot /srv/www/standingstart.net/public_html/
ErrorLog /srv/www/standingstart.net/logs/error.log
CustomLog /srv/www/standingstart.net/logs/access.log combined</virtualhost>
The other domain is:
<virtualhost 178.79.183.119:80=""># Postfix admin
Alias /postfixadmin /srv/www/postfixadmin
# blog
ServerAdmin chris@pixelatedphotographer.com
ServerName chrisgilloch.com
ServerAlias www.chrisgilloch.com
DocumentRoot /srv/www/chrisgilloch.com/public_html/
ErrorLog /srv/www/chrisgilloch.com/logs/error.log
CustomLog /srv/www/chrisgilloch.com/logs/access.log combined</virtualhost>
When I had them both at
[warn] VirtualHost 178.79.183.119:80 overlaps with VirtualHost 178.79.183.119:80, the first has precedence, perhaps you need a NameVirtualHost directive
and updated the hosts file:
127.0.0.1 localhost.localdomain localhost
178.79.183.119 swansea.chrisgilloch.com swansea
178.79.183.119 swansea.standingstart.net swansea
but
My DNS settings are as follows:
~~![](<URL url=)http://www.pixelatedphotographer.com/chris/stand.png
~~![](<URL url=)http://www.pixelatedphotographer.com/chris/chris.png
I'm running Apache on ubuntu lucid
Can you guys spot where I'm going wrong? Any ideas would be great!
Cheers
Chris~~~~
4 Replies
<virtualhost 178.79.183.119:81=""></virtualhost>
standingstart.net is on port 81, not port 80.
You'd have to set up apache to listen on port 81 and access the site as
Just going to
You should look at this piece of apache documentation
@crazyfruitbat:
…
When I had them both at
I got the error: [warn] VirtualHost 178.79.183.119:80 overlaps with VirtualHost 178.79.183.119:80, the first has precedence, perhaps you need a NameVirtualHost directive
… This should possibly be a hint at what you may be missing, though. Somewhere in your configuration (not in one of the sites-available files), you need a line like this:
NameVirtualHost 178.79.183.119:80
I stuck:
NameVirtualHost 178.79.183.119:80
ServerAlias chrisgilloch.com *.chrisgilloch.com
DocumentRoot /srv/www/chrisgilloch.com/public_html/
DocumentRoot /srv/www/standingstart.net/public_html/
Into the httpd.conf file and that resolved the issues.
Thank you for all the help!