Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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

share|improve this answer

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/

share|improve this answer
    
Thanks, I tried your options and it didn't make a difference. I also did not add any .htaccess file to /var/www-cake/repo. Is there possibly a step I am missing? –  JD Isaacks Dec 28 '10 at 21:44
    
Last thing I can think of is permissions issue - but you would probably see something like "403: Forbidden" and not a 404. –  Marco Ceppi Dec 28 '10 at 21:48
    
Yeah, and another strange part is that if there is a index.php which it shows in the directory listing, then why is it showing the directory listing at all, shouldn't it just load the index.php file. –  JD Isaacks Dec 28 '10 at 22:03
    
please see my answer :) –  JD Isaacks Dec 29 '10 at 14:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.