Files inside Alias folder not accessible
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
</Directory>
inside the /var/www-cake/repo directory I just have 1 file that is index.php
when I go to http://linux-server/cake/ I get a directory listing that shoes the index.php file. When I click on the 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?
Solution 1:
I changed my code to this:
Alias /cake /var/www-cake/repo
<Directory /var/www-cake/repo>
Order allow,deny
Allow from all
Options +Indexes
</Directory>
Notice the trailing slash is now removed from the Alias. I do not know why this made a difference I was just trying random things and this one seemed to fix it :)
Solution 2:
Insider your directory block trying updating Options
to: Options +Indexes +MultiViews +FollowSymLinks
After your edits make sure to restart the Apache service.
Secondly make sure you don't have any conflicting directives in a .htaccess file inside /var/www-cake/repo/