You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Denise Mangano <De...@complusdata.com> on 2003/05/27 21:21:18 UTC

[users@httpd] Alias question - please help

I have a simple question regarding Aliases... I'd appreciate some help as
soon as possible :)

My main server document root is set as /var/www/html/ with permission set to
deny all.  My server is configured for 3 Vhosts (pasted below).  Without
setting up an Alias I can access www.mysite.com/site1, www.mysite.com/site2,
etc because the site1 and site2 directories are in the Vhost document root
in which permission is set to allow all.  However, if I type in
www.mysite.com/images I can see a directory listing of the images folder.  

So the question is should I set the document root to deny from all then set
up the Aliases - or is this config OK and I would just need to disable
directory listing (and if so can you point me in the right direction)?

Thanks!! Much appreciated!

Denise

----httpd.conf----
# This VHost is used for requests without a known server name (will also
redirect for subdirectories)
<VirtualHost *>
  DocumentRoot "/var/www/html/mysite"
  <Directory "/var/www/html/mysite">
    Order allow,deny
    Allow from all
  </Directory>
  Redirect /index.html http://www.mywebsite.com

  #Add a redirect in for each client so all requests from incorrect domains
still get routed
  Redirect /site1 http://www.mywebsite.com/site1
  Redirect /site2 http://www.mywebsite.com/site2
</VirtualHost>

#This VHost is the default VHost for the website - all requests should come
in through here
<VirtualHost _default_ *>
   ServerName www.mysite.com
   DocumentRoot "/var/www/html/mysite"
   <Directory "/var/www/html/mysite">
     Order allow,deny
     Allow from all
   </Directory>
</VirtualHost>

# This VHost is set up for testing before pages put into production
<VirtualHost *>
   ServerName test.mysite.com
   DocumentRoot "/var/www/html/test.mysite"
   <Directory "/var/www/html/test.mysite">
     Order deny,allow
     Deny from all
     Allow from 12.42.32.222 
   </Directory>
</VirtualHost>



---------------------------------------------------------------------
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] Alias question - please help

Posted by Jeff Cohen <su...@gej-it.com>.
I don't think that you question is related to Aliasing, if it does, than 
please try explaining more about what you need cause it's hard to 
understand what you are trying to do in the right way.
Jeff Cohen


> I have a simple question regarding Aliases... I'd appreciate some help
> as
> soon as possible :)
> 
> My main server document root is set as /var/www/html/ with permission
> set to
> deny all.  My server is configured for 3 Vhosts (pasted below). 
> Without
> setting up an Alias I can access www.mysite.com/site1,
> www.mysite.com/site2,
> etc because the site1 and site2 directories are in the Vhost document
> root
> in which permission is set to allow all.  However, if I type in
> www.mysite.com/images I can see a directory listing of the images
> folder.  
> 
> So the question is should I set the document root to deny from all then
> set
> up the Aliases - or is this config OK and I would just need to disable
> directory listing (and if so can you point me in the right direction)?
> 
> Thanks!! Much appreciated!
> 
> Denise
> 
> ----httpd.conf----
> # This VHost is used for requests without a known server name (will
> also
> redirect for subdirectories)
> <VirtualHost *>
>   DocumentRoot "/var/www/html/mysite"
>   <Directory "/var/www/html/mysite">
>     Order allow,deny
>     Allow from all
>   </Directory>
>   Redirect /index.html http://www.mywebsite.com
> 
>   #Add a redirect in for each client so all requests from incorrect
> domains
> still get routed
>   Redirect /site1 http://www.mywebsite.com/site1
>   Redirect /site2 http://www.mywebsite.com/site2
> </VirtualHost>
> 
> #This VHost is the default VHost for the website - all requests should
> come
> in through here
> <VirtualHost _default_ *>
>    ServerName www.mysite.com
>    DocumentRoot "/var/www/html/mysite"
>    <Directory "/var/www/html/mysite">
>      Order allow,deny
>      Allow from all
>    </Directory>
> </VirtualHost>
> 
> # This VHost is set up for testing before pages put into production
> <VirtualHost *>
>    ServerName test.mysite.com
>    DocumentRoot "/var/www/html/test.mysite"
>    <Directory "/var/www/html/test.mysite">
>      Order deny,allow
>      Deny from all
>      Allow from 12.42.32.222 
>    </Directory>
> </VirtualHost>
> 
> 
> 


---------------------------------------------------------------------
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