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 have had several stable sites running on a Media Temple DV server for months now without any issues. Last night around 9pm CST, several of my sites simply started failing and showed Fedora error landing pages. When I contacted Media temple support, they claimed it was due to the .htaccess file directing improperly.

After doing my own research, I believe this to be completely inaccurate based on the following:

1) Nothing on our server changed between 6pm and the time the error occurred (either files or configurations)

2) the .htaccess mod_rewrite is enabled correctly on the httpd.conf file and has been verified numerous times as well as restarting the apache server altogether.

3) If you browse to my site, you will find that the .htaccess file DOES in fact work exactly as it supposed to (www.aabbenefits.com/home lands on a page which is actually home.php). Clicking the links on the page, all the file extensions are left off as they should. Similarly, entering a bad url generates my custom 404 page (which is handled by the .htaccess file).

4) Browsing to www.aabbenefits.com simply does not pick up index.php (but if you type in www.aabbenefits.com/index.php it does).

Looking at the apache error logs, I find that when visiting www.aabbenefits.com, the following error is returned:

Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /var/www....

This made me think something was again wrong in the apache configuration file but it is not:

LoadModule rewrite_module is uncommented

<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride All
Order allow, deny
Allow from all
</Directory>

My .htaccess file is:

ErrorDocument 404 /404.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

I am at a total loss for words and really need to get my server back and running with a big enrollment period tomorrow coming, this couldn't have hit at a worse time.

I am running CentOS 5.5 on apache php/mysql configuration through Media Temple.

Please tell me somebody can recognize something I'm missing or has had this issue before.

### SOLVED ###

Well I have no idea why the problem came about in the first place, what the fix actually did or what the hell is going on but I "fixed" my problem with the following route:

I modified the following file:

vi /etc/httpd/conf.d/welcome.conf

I then commented out all lines on the page, saved the file, restarted the server and voila. I would say I am relieved but I am almost more pissed off that I don't understand how or why it happened.

I'll leave the question open in case anybody can figure it out. Last thought, it doesn't make a ton of sense that a Fedora page would appear on a CentOS installation?

share|improve this question
    
is this what you really meant: <Directory "var/www/html"> and not <Directory "/var/www/html"> ? –  sysfault Oct 13 '10 at 9:54
    
no, I meant: <Directory "/var/www/html"> –  JM4 Oct 13 '10 at 10:09
    
If it is solved, it would be helpful if you would move this question off the "unanswered" list by either accepting adirau's answer or by entering your own answer and accepting it. –  RedGrittyBrick Oct 13 '10 at 13:22
    
@RedGrittyBrick - the problem is "solved" only in the sense that I am not experiencing the same error. WHY the error occurred or what was actually causing the index.php pages of sites with .htaccess to not load in the first place (when no changes were made to our system whatsoever) is not solved and is more important than seeing the issue live. –  JM4 Oct 13 '10 at 18:13
add comment

2 Answers 2

you probably had a per serverconfig DirectoryIndex setuped as the default landing page. If you define directory index as index.php in your vhost/directory/.htaccess config that will probably solve it as well, rewriting the default setup.

share|improve this answer
    
as I mentioned above- nothing was changed on our server from 2 pm yesterday (when things were fine) to 9 pm yesterday (when sites faced errors). –  JM4 Oct 13 '10 at 18:14
add comment
up vote 0 down vote accepted

Although nobody can seem to determine why - the .htaccess file does seem to work after I made the edits in my comment above. Guess I'll just have to take it for what it is and never know why!

share|improve this answer
add comment

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.