Why do I see the "Apache is functioning normally" page instead of my domain? (sometimes: "Hey it worked!")


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » DNS

Why do I see the "Apache is functioning normally" page instead of my domain? (sometimes: "Hey it worked!")Last Modified: Dec 3, 2014, 11:22 pm
This guide refers to when you're seeing

Apache is functioning normally

or

Hey, it worked !
The SSL/TLS-aware Apache webserver was
successfully installed on this website.

or

This IP is being shared among many domains.
To view the domain you are looking for, simply enter the domain name in the location bar of your web browser.

insetad of your domain's contents when viewing your domain.

The cause of this is that either
1) the value the domain resolves to *at your computer* is not matching the value apache is using

2) OR the virtualhost is not included in the apache configs.

For 1) to check this, simply go to Admin Level -> Show All Users, look for the domain, and see what IP it's set to use.
Next, you need to figure out what IP the domain resolves to.  It's best to use an external server like dnsreport.com or some other free lookup services to determine the IP the domain resolves to.   These 2 IPs need to match.
** Note that if you've recently changed the IP of your domains, you'll have up to 4 hours of waiting before the new IP propogates to you.  So seeing the above pages is *normal* for doing IP changes.  To lower this time, lower your TTL before making the IP change (see link below)

For 2) There are a few things to check.  The user httpd.conf files are:
/usr/local/directadmin/data/users/username/httpd.conf
and this file must be "Include"ed into your main /etc/httpd/conf/httpd.conf one of two possble ways, depending on your setup.

a) if you've got custombuild (usually apache 2.2) then check the /etc/httpd/conf/httpd.conf.
You should see the line:

Include conf/extra/directadmin-vhosts.conf

somewhere near the bottom of the file. Then in the /etc/httpd/conf/extra/directadmin-vhosts.conf file, you should see the Include line for the user httpd.conf

Include /usr/local/directadmin/data/users/username/httpd.conf

If you *don't* see that, you can rewrite all of the apache confs with:

cd /usr/local/directadmin/custombuild
./build rewrite_confs

Make sure that you see:
apacheconf=/etc/httpd/conf/extra/directadmin-vhosts.conf
in your /usr/local/directadmin/conf/directadmin.conf for this setup.

b) if you're using customapache (usually apache 1.3), then it's the same idea, but the user httpd.conf

Include /usr/local/directadmin/data/users/username/httpd.conf

will be directly in your /etc/httpd/conf/httpd.conf.
Also, the /usr/local/directadmin/conf/directadmin.conf should hold:
apacheconf=/etc/httpd/conf/httpd.conf



LAN setup
If you're on a LAN, then your incoming device IP would be your LAN IP, and not the external IP.
This would relate to the IP the VirtualHost has.
If you are running on a LAN, ensure you've follow all steps from this guide:
http://www.directadmin.com/lan.shtml
Specifically, steps #4 and #5.   Step 4 in the lan guide will link your LAN ip to the external IP, adding the LAN IP to the VirtualHost.

You can check which IP is used for incoming connections by creating

/var/www/html/info.php

and adding the code

<?php phpinfo(); ?>

and view it through Apache, and checking the variable:

_SERVER["SERVER_ADDR"]

The IP listed there is the IP that Apache sees.  It's what you'd need to add to your VirtualHost.. either with the linked IP system, or by changing the IP that the domain resolves to.

 
Related Helpfiles
How to lower your TTL just before an IP change
How to add all of the Include lines into your httpd.conf

2003 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST