[Gllug] Problems with mod_alias and Apache

Progga proggaprogga at gmail.com
Thu Aug 28 14:18:10 UTC 2008


On Thu, Aug 28, 2008 at 03:03:59PM +0100, william pink wrote:
> 
> File does not exist: /var/www/foo/example
> 
> But of course I want it to point at /var/www/example
> 
> Heres my VH config for that part now
> 
>     Alias /example/ /var/www/example
>      <Directory /var/www/example>
>        Order allow,deny
>        Allow from all
>       </Directory>
> 
> But looking at the Apache docs that appears to be the right way of doing it?

Here's an example from the Apache doc (http://httpd.apache.org/docs/2.2/mod/mod_alias.html) :

    Alias /image /ftp/pub/image
    <Directory /ftp/pub/image>
        Order allow,deny
        Allow from all
    </Directory>

It also says:
    Note that if you include a trailing / on the url-path then the server will
    require a trailing / in order to expand the alias. That is, if you use

        Alias /icons/ /usr/local/apache/icons/

    then the url /icons will not be aliased.


At least the following from your httpd.conf should work:

> >>     Alias /doc/ "/usr/share/doc/"
> >>     <Directory "/usr/share/doc/">
> >>         Options Indexes MultiViews FollowSymLinks
> >>         AllowOverride None
> >>         Order deny,allow
> >>         Deny from all
> >>         Allow from 127.0.0.0/255.0.0.0 ::1/128
> >>     </Directory>


HTH


-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list