You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Aman Raheja <ar...@techquotes.com> on 2005/01/10 15:12:27 UTC

[users@httpd] Directory directive in Vhost

I have a vhost config as follows

<VirtualHost 10.0.0.22:80>
  ServerName www.mydom.com
  ServerAdmin admin@mydom.com
  DocumentRoot "/home/web/instance/htdocs/carter"
  ErrorLog "logs/instance/error_log"

  LogLevel warn
  CustomLog "logs/instance/access_log" "%h %l %u %t \"%r\" %s %b 
\"%{Referer}i\" \"%{User-agent}i\" \"userid=%{Cookie}n\""
 
  <Directory "/home/web/instance">
    AllowOverride None
    Options ExecCGI FollowSymLinks Includes
    Order Deny,Allow
    Allow from All
    AddOutputFilter INCLUDES  .htm .html .ssi
  </Directory>

</VirtualHost>


What I am questioning is the Directory directive, which is configured to 
be /home/web/instance, while the doroot for the vhost is 
/home/web/instance/htdocs/carter. If I am right I think that Directory 
directive should be /home/web/instance/htdocs/carter, if I want to have 
everything accessible to have those directory properties and all the 
subdirectories under /home/web/instance don't mean to be anything since 
they are below the docroot. Or does this have any other consequence ?
Thanks in advance.
Regards
Aman Raheja

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Directory directive in Vhost

Posted by Dick Davies <ra...@hellooperator.net>.
* Aman Raheja <ar...@techquotes.com> [0112 14:12]:
> I have a vhost config as follows
> 
> <VirtualHost 10.0.0.22:80>
>  ServerName www.mydom.com
>  ServerAdmin admin@mydom.com
>  DocumentRoot "/home/web/instance/htdocs/carter"
>  ErrorLog "logs/instance/error_log"
> 
>  LogLevel warn
>  CustomLog "logs/instance/access_log" "%h %l %u %t \"%r\" %s %b 
> \"%{Referer}i\" \"%{User-agent}i\" \"userid=%{Cookie}n\""
> 
>  <Directory "/home/web/instance">
>    AllowOverride None
>    Options ExecCGI FollowSymLinks Includes
>    Order Deny,Allow
>    Allow from All
>    AddOutputFilter INCLUDES  .htm .html .ssi
>  </Directory>
> 
> </VirtualHost>
> 
> 
> What I am questioning is the Directory directive, which is configured to 
> be /home/web/instance, while the doroot for the vhost is 
> /home/web/instance/htdocs/carter. If I am right I think that Directory 
> directive should be /home/web/instance/htdocs/carter, 

I'd have thought so yeah. Effectively the directory option block says
'run everything under here as a cgi' which is a bit odd , especially for
files that aren't readable by the browser. (though maybe they are called by
aliases). This will also mean that all files in the docroot will run as though

they are cgis (which is a bit strange for GIFs, say).

Assuming that this *is* a vhost full of cgis, then setting the two paths
equal makes sense.

> if I want to have 
> everything accessible to have those directory properties and all the 
> subdirectories under /home/web/instance don't mean to be anything since 
> they are below the docroot. Or does this have any other consequence ?

Really depends how the rest of the server is setup - as I said, you might
have cgis under /home/web/instance which will no longer run if you set directory
= "/home/web/instance/htdocs/carter"


-- 
'With that big new contract, I've been able to make those government mandated
upgrades you've all been suing me about.'
		-- Prof. Farnsworth
Rasputin :: Jack of All Trades - Master of Nuns

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org