Make IP Address point to webroot instead of virtual hosts' documentroot

2

I used to have a one-to-one domain name and IP. Recently I've paid for a second domain name and decided to host it on the same box and IP. As such, I added virtualhosts to point each domain name to a different document root (i.e. /var/www/webbie1 and /var/www/webbie2).

The question I have is, can I still make the IP, e.g. http://XXX.XXX.XXX.XXX, point to the webroot, i.e. /var/www/? If so, how do I go about doing it?

For a fuller picture, the box is on an Ubuntu server OS and I'm using apache2 as the app server. the changes I made to enable to virtual hosts were in the apache2.conf file with the <VirtualHost [IP address]> ... </VirtualHost> tags.

Reuben L.

Posted 2012-06-11T07:42:13.080

Reputation: 942

Answers

0

I've made it work by adding an additional vhost tag that uses the IP as the domain name. So far so good. Not sure if that's the right way but its not like I have any other answers =P.

Reuben L.

Posted 2012-06-11T07:42:13.080

Reputation: 942