- Make sure the httpd daemon is running
- ps ax | grep -i http
- If not, start it
- From server, as root, cat the html file from the server.
- Check the file for existence
- On server, log in as a privelegeless user
- Starting from the root directory (/), ls and cd down one directory
at a time to the directory containing the html file.
- If you cannot see OR cd any directory between the root and
the file, or if you cannot read the file, it cannot be read in a webserver
(an exception would be if the file or directories were owned by the Apache
user, but that's unusual).
- Once inside the directory containing the file, cat it.
- If you cannot read the file, it cannot be read in a webserver
(an exception would be if the file or directories were owned by the Apache
user, but that's unusual).
- From server, lynx the html file as a file (lynx /home/mylogin/public_html/index.html).
- This will reveal any problems with the html code that could
be causing problems.
- From server, ping the IP address connected to the website.
- If you can't ping the address, a server can't see anything at
that address. Fix the address's connectivity problem.
- From the server, lynx the html file as http://IP/dir/filename
- If this fails, it's likely either your httpd daemon isn't running
or a basic problem with your httpd.conf setup.
- Restart Apache, and look at your log files for clues.
- In httpd.conf, look especially at:
- Any applicable VirtualHost and NameVirtualHost directives
- Right domain name?
- Right document root?
- Right IP address?
- If name based virtual hosting, do the VirtualHost IP address
match those of the applicable NameVirtualHost directive?
- Global and directory Options, AllowOverride, Allow From, Order,
ErrorDocument,
- DirectoryIndex directive (be sure it shows the particular
filetype when accessed by directory only)
- Global and directory AccessFileName, and the contents of that
file (be sure you're not screening yourself out)
- Global and directory TypesConfig, and the contents of that
file (be sure you're handing the file off to your browser)
- Global and directory DefaultType (be sure you're handling
the filetype properly) If it's not text/plain, try changing it to that.
- User and Group directives
- Global DocumentRoot
- Particular directory's DocumentRoot (if any)
- Global Options and AllowOverride
- From server, use the host command to verify that the domain (www.mydomain.cxm
etc) matches the IP address.
- From server, lynx the file as http://IP_address/dir/filename.
- If that didn't work, recheck your DNS and your file location.
- From another box, lynx the file by http://IP/dir/filename.
- If that didn't work, it's likely either that the other box has
a connectivity problem with the server. Investigate and fix.
- From another box, check the associated domain name with the host
command.
- If not, take steps so the other box has access to your server's
DNS, or your server's DNS is based on a DNS system available to the other
box. Probably the simplest resolution is placing the server's IP as a Nameserver
directive in the other box's /etc/resolv.conf.
- From another box, lynx the file by http://domain/dir/filename.
- If this doesn't work, recheck your DNS setup and verify you
haven't written the wrong domain name, directory path or filename in the
browser.
- From another box, Mozilla the file by http://domain/dir/filename.
- If lynx works but Mozilla doesn't, it's probably either a Mozilla
cache thing or some other Mozilla problem. Dump both file and memory cache
on Mozilla and see whether that cures the problem. Otherwise, investigate,
including access by other graphical browsers.
|