0

After my site is moved from a shared hosting plan to VPS (dreamhost), all request returns:

Not Found

The requested URL /index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

For example.com/, it does returns some content. Any other requests (e.g. example.com/install.php) returns 404.

Rewrite settings are as default:

RewriteEngine on

# RewriteBase /

# Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

What should I check?

Update:

If I request example.com/? or example.com/?q=user, it returns:

Site Temporarily Unavailable
We apologize for the inconvenience. Please contact the webmaster/ tech support immediately to have them rectify this.

error id: "bad_httpd_conf"

3
  • Did you check that the index.php file exists?
    – avpaderno
    Commented Mar 3, 2012 at 2:21
  • Yes, index.php exist. BTW, even /INSTALL.txt return 404
    – ohho
    Commented Mar 3, 2012 at 2:40
  • Are there any messages in the Apache error_log?
    – mpdonadio
    Commented Mar 3, 2012 at 12:47

3 Answers 3

1

About the "Site Temporarily Unavailable" error, the DreamHost site reports the following:

The Root Cause of the Error

This error means that the IP your domain is resolving to on our system points to an Apache web server not configured for your domain. When this happens, the Apache web server just shows the first domain listed in its config file. So, to make sure nobody's site ever shows some other random site we host, we made the first domain in all our config files just show that page. In fact, DreamHost made up the error id: "bad_httpd_conf" stuff ourselves just so we'd know what the problem was when reported to us! Of course, if everything is working right in our system, this should never happen. If it is happening, don't feel bad about contacting us to fix it! However, there are some ways you can possibly fix it yourself immediately…

Resolving the issue

There are several ways to solve this problem.
IMPORTANT: If this problem appears shortly after making a configuration change for that domain in the control panel this could be caused by the IP address for that domain changing. If that's the case this error should go away within about 2 hours - once the DNS change propagates throughout the Internet. This is normal. If it doesn't go away after 2 hours then try these troubleshooting techniques.

Pro tip

Check for the correct IP. Linux and Mac users can use the "dig" command in a terminal. Example:

$ dig +short domain.com
x.x.x.x
$ dig +short @ns1.dreamhost.com domain.com
x.x.x.x

The first command shows the IP you're getting to your computer. The second command shows the IP that is setup in DreamHost's system. If domain.com is using DreamHost nameservers, you should be getting the same IP with both commands.

Windows users can use the "nslookup" command in a command prompt. Example:

C:\Users\user>nslookup domain.com
Name: domain.com
Address: x.x.x.x
C:\Users\user>nslookup domain.com ns1.dreamhost.com
Name: domain.com
Address: x.x.x.x

The first command shows the IP you're getting to your computer. The second command shows the IP that is setup in DreamHost's system. If domain.com is using DreamHost nameservers, you should be getting the same IP with both commands.

If you're not using DreamHost's DNS

If you aren't using DreamHost to manage your domain's DNS, most likely the IP they are serving your domain from changed. It's up to you to notice this and fix it! You can figure out the correct IP by querying the DreamHost nameserver with one of the commands in the above section (depending on your OS). Another way to find the correct IP is just login to panel.dreamhost.com and go to Domains -> Manage Domains -> DNS (for the domain in question) and find the A record in the "non-editable" section. Then, update your A record to point to that IP and once DNS propagates, the bad_httpd_conf error should go away!

3

Check to make sure that the directory containing Drupal on your server can read the contents of your .htaccess files (the AllowOverride directive in your httpd.conf controls what will be processed). In my experience, AllowOverride None set for that directory or a parent directory is the most common culprit (remember: directives are inherited).

0

If apache2 installed on your server make sure mod_rewrite (rewrite) enabled. In Ubuntu case you can check this by commend:

ls /etc/apache2/mods-enabled/ | grep rewrite

If result is empty, you have to enable mod_rewrite and reload apache config:

sudo a2enmod rewrite
sudo service apache2 reload

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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