List Info

Thread: Re: Virtual host config




Re: Virtual host config
user name
2005-09-06 18:09:24
On Tuesday 06 September 2005 10:20,  the author Vizion
contributed to the 
dialogue on-
 [usershttpd] 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.
_______________________________________________
freebsd-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"
Re: Virtual host config SOLVED
user name
2005-09-06 22:45:37
On Tuesday 06 September 2005 16:09,  the author Vizion
contributed to the 
dialogue on-
 Re: [usershttpd] Virtual host config: 

>On Tuesday 06 September 2005 10:20,  the author Vizion
contributed to the
>dialogue on-
>
> [usershttpd] 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?

OK solved it - the manual I was using gave the impression
that the 
DocumentRoot was specified relative to the server root
rather than 
absolutely. Once I got over that the rest fell into place.

Thanks
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.
_______________________________________________
freebsd-questionsfreebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-que
stions
To unsubscribe, send any mail to
"freebsd-questions-unsubscribefreebsd.org"
Re: Virtual host config
user name
2005-09-07 02:44:54
On Tue, Sep 06, 2005 at 04:09:24PM -0700, Vizion wrote:
> On Tuesday 06 September 2005 10:20,  the author Vizion
contributed to the 
> dialogue on-
>  [usershttpd] 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.

FreeBSD port default configuration restricts access to
$/www. 
You must explicitly allow access to other directories.

clem
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )