[Gllug] Problems with mod_alias and Apache

william pink will.pink at gmail.com
Thu Aug 28 14:43:34 UTC 2008


It appears the Alias isn't working, the module mod_alias is enabled though.

I changed it to /test and this appeared in my Apache log file

File does not exist: /var/www/example/test

so it narrows it down but I then haven't got a clue what could be
causing mod_alias not to work.

Thanks guys,

Will




On 8/28/08, Progga <proggaprogga at gmail.com> wrote:
> 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
>
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list