Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got an Ubuntu 10.04 server running Apache2, which hosts a couple of my sites. Most of them are CMS's of some kind, so they usually pose no problem.

But I recently uploaded a page of mine to the server, and it seems, that the url example.com/admin can't be loaded. I can't for the life of me figure this.

Just to clarify, this happens only with /admin. Every other Controller (Working with MVC pattern) is loading fine.

Is there a hidden config of some sort somewhere?

I am also using an .htaccess, but it has no rules that would cause this behaviour on a Linux machine, but not on a Win machine.

The error logs say:

[Mon Apr 16 23:33:23 2012] [error] [client 78.x.x.x] File does not exist: /srv/www/example.com/public_html/admin

I'm completely stumped. The Apache2 settings don't have anything that would cause this either. Help?

share|improve this question

2 Answers 2

The hotfix is mod_rewrite..

RewriteEngine on

RewriteRule admin$ /admin/ [R=301,L]

--

Or install/enable mod_dir Default: DirectorySlash On

--

Note: in a <Directory "/var/www/html/"> trailing VS. no trailing slash also makes a difference.

share|improve this answer
up vote 0 down vote accepted

It turned out, that my problem was Apache related.

While searching for a solution, I realised that the virtualhost on my dev machine and my server were not pointing to the same DocumentRoot, which meant, that while I had provided an extra .htaccess file to redirect the request to the right directory, both envoirnments were not using the same setup.

In short, make sure you're using the same setup for both envoirnments. Or better yet, duplicate your dev and production envoirnments.

share|improve this answer

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.