Troubleshooters.Com and T.C Linux Library Present

Troubleshooting Ladder and Tree:
Static Web Pages

Copyright (C) 2003 by Steve Litt, All rights reserved. Material provided as-is, use at your own risk.


Steve Litt is the author of Troubleshooting Techniques of the Successful TechnologistRapid Learning: Secret Weapon of the Successful Technologist, and Samba Unleashed.

Executive Summary

This page contains two predefined diagnostics for troubleshooting static web pages:
  1. A troubleshooting ladder, from least to most abstract. Although pessimistic troubleshooting, its simplicty can save time.
  2. A troubleshooting tree, starting in the middle and practicing binary search. Once memorized, it can yield quicker solutions.

Ladder (Pessimistic Troubleshooting)

This is a troubleshooting ladder starting with the least abstract, proceding to the most abstract. Although it's sequential search instead of binary search, its simplicity can often save time, ESPECIALLY if the troubleshooting is being done by those unfamiliar with either Apache or the process of Troubleshooting. You'll notice the similarity to Samba's DIAGNOSIS.txt, which is also a troubleshooting ladder.

Static Web Page Diagnostic Ladder

             
      
  1. Make sure the httpd daemon is running
    • ps ax | grep -i http
    • If not, start it
      • service httpd start
  2. From server, as root, cat the html file from the server.
    • Check the file for existence 
  3. On server, log in as a privelegeless user
  4. 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).
  5. 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).
  6. 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.
  7. 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.
  8. 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
  9. From server, use the host command to verify that the domain (www.mydomain.cxm etc) matches the IP address.
    • If not, fix your DNS.
  10. From server, lynx the file as http://IP_address/dir/filename.
    • If that didn't work, recheck your DNS and your file location.
  11. 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.
  12. 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.
  13.  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.
  14.  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.


Tree (Optimistic Troubleshooting)

This is a tree-like predefined diagnostic optimized to quickly find a solution for those familiar with the basics of Apache and with the basics of Troubleshooting Process. It's optimistic, assuming success at the start and then using divide and conquer to find a solution. Its complexity makes it unsuitable for the casual user.
Static Web Page Diagnostic Tree
From another box, Mozilla the file by http://domain/dir/filename
Works?
Done
Doesn't work?
Verify that the httpd daemon is running, if not start it and retest
From same box, lynx by IP address
Works?
From same box lynx by domain name
Works?
Dump Mozilla DNS cache, troubleshoot as necessary
Doesn't work?
Check DNS with host command
Works?
Troubleshoot further
Doesn't work
FIX DNS!!!!!
Doesn't work?
From server, lynx by IP address
Works?
Ping by IP between client and server
Works?
Troubleshoot further
Doesn't work?
Fix network connectivity
Doesn't work?
lynx by directory and file
Works?
Verify ping by that IP address
Works?
Fix httpd.conf
Doesn't work?
Fix the IP address
Doesn't work?
Verify the filename and dir
Verify file ownership/permissions
Verify properly formatted html file




Back to Troubleshooters.Com * Back to Linux Library