1

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?

0

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.

| improve this answer | |
0

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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