Files inside Apache Alias folder not accessible from web browser

I am running Apache2 on Ubuntu 10.4

In my apache2.conf I have an alias setup like this:

Alias /cake/ /var/www-cake/repo
<Directory /var/www-cake/repo>
    Order allow,deny
    Allow from all
    AllowOverride All
    Options +Indexes

inside the /var/www-cake/repo directory I have some .txt and .php files one is index.php and there is also a hidden .svn folder because it is a working copy.

when I go to http://linux-server/cake/ I get a directory listing that shoes the .php and .txt files. When I click on a file it takes me to http://linux-server/cake/index.php in which I get a 404 page not found error.

What do I need to do to make the files accessible?

hm, do you have something redirecting all /cake/* stuff to index.php?

I haven’t used Alias much myself so I’m not really sure, but the manual on the Alias directive would suggest that if you put a slash at the end of the alias there should also be a slash at the end of the file path and vice versa.

So instead of

Alias /cake/ /var/www-cake/repo

It should be either:

Alias /cake /var/www-cake/repo
           ^ remove / here


Alias /cake/ /var/www-cake/repo/
                               ^ add / here

Please let us know if that helps :slight_smile: