[PLUG] How to setup Apachie Virtial Hosts

Jim Karlock Jkarlock at earthlink.net
Sun Mar 20 09:06:55 UTC 2005


I am having trouble setting up name based virtual hosting. I have included 
the VirtualHost section of the httpd.conf file at the end of this eamil.

I have a set of files in var/www/html which serve OK when I enter 
209.210.229.130 in a web browser. This is as it was before I tried to add 
virtual hosting. A second web site located at /var/www/wschopp/html behaves 
as follows:

Enter www.schoppformetro.com into a browser and you get the Fedora Core 
Test Page (I presume that this means it works)

Enter http://www.schoppformetro.com/index.html into a browser and you get :
Forbidden, You don't have permission to access /index.html on this 
server,Additionally, a 403 Forbidden error was encountered while trying to 
use an ErrorDocument to handle the request. (I take that this is a 
permissions problem, but I think the permissions are set the same as for 
the files that work from var/www/html. All of these files were created on 
Windows and moved to the Linux box with a pen drive.)

Before I started mucking around with the config file, entering 
www.schoppformetro.com into a browser would get the index.htm from 
/var/www/html. Of course I want to serve up files from wschopp/html 
wherever it must be put.

(mclp.org does not point to this IP address yet)

Once this problem is solved, I hope to add 3-5 more virtual hosts.

Any suggestions?

Thanks
JK

---------------------------------------------
<VirtualHost *:80>
	ServerName 209.210.229.130
	DocumentRoot /var/www/html
   	ServerSignature email
  	DirectoryIndex  index.php index.html index.htm index.shtml
  	LogLevel  warn
  	HostNameLookups off
</VirtualHost>

# Virtual host Virtual Host 0
<VirtualHost *:80>
	ServerName www.schoppformetro.com
  	ServerAlias schoppformetro.com
	DocumentRoot /var/www/wschopp/html
	DirectoryIndex  index.php index.html index.htm index.shtml
</VirtualHost>

# Virtual host Virtual Host 1
<VirtualHost *:80>
	ServerName www.mclp.org
  	ServerAlias mclp.org
  	DocumentRoot /var/wmclp/html/
</VirtualHost>




More information about the PLUG mailing list