Site not found

From DreamHost
(Redirected from Bad httpd conf)
Jump to: navigation, search

The Error

Your site mysteriously shows a sleepy DreamHost bot above the following text:

Site Not Found
Well, this is awkward. The site you're looking for is not here.
Is this your site? Get more info or contact support.
DreamHost

What the heck?

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...

DNS changes

Frequently this error appears due to a change in your ip address, which is commonly triggered by setting up a MIRROR, REDIRECT, PARK, or CLOAK, etc. Or changing a domain to fully hosted from some other setting. While changes to the Dreamhost name servers (aka dns servers) are nearly instantaneous, the new information doesn't reach other servers until the other servers drop the old data that they are holding on to. This is referred to as DNS propagation. The reason why you get this error during that period of time is the DNS information that you are receiving is outdated, and the Apache instance that you are being incorrectly sent to no longer has any record of your site. Depending on your location, it can take up to several hours for DNS changes to propagate, so the best thing to do is leave your domain alone for a few hours before attempting any sort of fix.

In addition, if you go to Manage Domains on the web panel and click the small DNS link under a domain, then you will be presented with a DNS page. If you click the blue "Go!" button at the top, the DNS information for that zone will be updated.

To check on the status of your DNS moves, you can visit what's my DNS? to see what IP address your domain resolves to.

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 4 hours - once the DNS change propagates throughout the Internet. This is normal. If it doesn't go away after 6 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. If not, try: http://wiki.dreamhost.com/Flush_DNS

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 not, try: http://wiki.dreamhost.com/Flush_DNS

Rebuilding httpd conf via Dreamhost's control panel

As already said before, the first try is quite simple. Go to https://panel.dreamhost.com. Under Domains -> Manage Domains, click on edit for domain that has "bad httpd conf" error. There's no need to change anything on it, you can simply save by pressing "Change settings". Then wait up to 10 minutes to see if the problem is solved. With this solution you've simply rebuilt the httpd configuration file.

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!

Suspended account

For accounts that are suspended due to non-payment, DreamHost will stop serving the DNS for the account. Your sites will then show bad_httpd_conf until you get paid up and re-activate the account. Login to your control panel or check your emails from DreamHost to see if that's you!

Contact support

If you cannot solve this problem using these hints please contact support.

With Passenger WSGI Enabled

This problem, or one like it, occasionally manifests on domains that have Passenger WSGI, in which case it appears differently. In the case of a domain with a Passenger application running, the server error page does not get displayed. Symptoms include

  1. other domains on the same account and server working correctly,
  2. timeouts trying to access the site
  3. no Passenger process showing up when running ps -A from the shell

In this instance, the solution appears to be the same - make a fake change to the domain and wait for it to propagate. (In testing, I disabled passenger, then re-enabled it, but it may be possible to fix the issue in one step as described above).