Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ virtualhosts config issue?

Posted by: jfullen Mar 16 2009, 01:30 AM

This is my first forray into setting up virtual hosts. I am moving 4 sites from Lunarpages to a linode. I set up a basic html page as a place holder for each of the four sites. One of the sites I simply switched the domain servers to linodes'. One of the others I used the import zone feature from linodes domain manager. The other two I left alone for now. Ok so I initally set up Apache, punched the ip into the browser and got the "IT WORKS!". Great. I then set out to set up some virtual hosts to handle the multiple sites.
- I created directories for each of the sites in /var/www/public_html/domainname/public,private,log,etc...
- I created a basic html file for each site and placed it /var/www/public_html/domainname/public/index.html
- I edited the apache2.conf file and added the lines
Include /etc/apache2/sites-enabled/
NameVirtualHost *:80
<IFModule mod_ssl.c>
NameVirtualHost *:443
- I created a vhost file for each domain and placed them /etc/apache2/sites-available/
the content of the file was:
# Place any notes or comments you have here
# It will make any customisation easier to understand in the weeks to come

# domain:
# public: /home/var/www/public_html/

<VirtualHost *:80>

# Admin email, Server Name (domain name) and any aliases

# Index file and Document Root (where the public files are located)
DirectoryIndex index.html
DocumentRoot /home/var/www/public_html/

# Custom log file locations
LogLevel warn
ErrorLog /home/var/www/public_html/
CustomLog /home/var/www/public_html/ combined


-I used the command sudo a2ensite for each of the sites. I rebooted Apache after each.

The problem is: I point the browser at the IP and the default html does not show. I am not sure if I set things up right. Any help or comments would be appreciated

Powered by Invision Power Board (
© Invision Power Services (