views:

16

answers:

0

Hi, I have multiple websites setup on my Apache2 server. The directory structure is as follows:

/var/www/

/var/www/site1.com

/var/www/site2.com

It is setup such that "www.site1.com" has root folder /var/www/site1, "www.site2.com" has root folder /var/www/site2, and http://server_ip_address has root folder /var/www

However, if I type http://server_ip_address/site1.com, it opens site1.com. I don't want this to happen. (That is, individual sites should be accessible only by typing the correct address).

What is the way to configure this. (Also it would be helpful if you could give tips on best practices for directory structures for multiple websites)?

thanks

JP