[users@httpd] Virtual host config

Vizion vizion at vizion.occoxmail.com
Tue Sep 6 16:13:33 PDT 2005


On Tuesday 06 September 2005 10:20,  the author Vizion contributed to the 
dialogue on-
 [users at httpd] Virtual host config: 

>Hi
>
>My Apache2 runs on Unix (Freebsd) with
>httpd.conf including
>ServerRoot "/usr/local"
>DocumentRoot "/usr/local/www/data"
>
>It is so long ago that I was working on apache that I have forgotten the
>basics!
>
>I am adding a number of virtual hosts the files  located as
>
>/usr2/virtualhosts/vhostname1/
>/usr2/virtualhosts/vhostname2/
>etc
>
>I want to keep the existing website running under /usr/local/www/data as
> well as the virtual hosts.
>
>I do not want to try the Virtual-Host Aliases until I have got my head
> around the basics!
>
>I have set up a virtualhosts.conf file using an Include directory:
>
>Include etc/apache2/Includes/*.conf
>
><VirtualHost x.x.x.x>
>        DocumentRoot /usr2/virtualwebs/vhostname1
>        ServerName vhostname1.com
>        AcceptPathInfo On
></VirtualHost>
>
>I am clearly not getting my set up/permissions right because I get
>
>You don't have permission to access / on this server.
>
>It seems  some needed directives are missing from the virtualhosts.conf
> and/or httpd.conf files.
>
>Despite reading the documentation I do not get it!

I have also tried using a link
dns1# cd www
dns1# ls -l
total 14

lrwxr-xr-x  1 root  wheel    18 Sep  6 14:20 virtualwebs -> /usr2/virtualwebs/
 
with virtualhosts.conf carrying entries of:

<VirtualHost x.x.x.x>
	DocumentRoot /www/virtualwebs/vhost1.com
	ServerName vhost1.com
	AcceptPathInfo On
</VirtualHost>
and tried
<VirtualHost x.x.x.x>
	DocumentRoot /virtualwebs/vhost1.com
	ServerName vhost1.com
	AcceptPathInfo On
</VirtualHost>
when that did not work
In either case I get
Warning: DocumentRoot [/www/virtualwebs/vhost1.com] does not exist

How can I get this right?
david

-- 
40 yrs navigating and computing in blue waters.
English Owner & Captain of British Registered 60' bluewater Ketch S/V Taurus.
 Currently in San Diego, CA. Sailing bound for Europe via Panama Canal after 
completing engineroom refit.


More information about the freebsd-apache mailing list