check a plaintext web server using wget

WW2 Nose Art

introduction

This is a very simple way of getting a page. It is useful for finding problems because it is so simple. You can bypass many areas such as the network, DNS protocols, and the load balancer and just test the web server itself.

This procedure uses the wget command. It uses a CLI (Command Line Interface). Wget is an application that copies files from the WWW to your computer. If you are feeling like getting back to basics, you can check a plaintext web server using telnet.

check from the web server host

If this test is successful, it proves that

  • the web server is running,
  • it is using the right IP address
  • the page can be given to clients (ie. it exists, it is in the right place and has the correct permissions).

  1. Open a CLI on the web server host.
  2. There may be a load of IP-based virtual servers on one computer. You may be able to check the web server name and IP address in the hosts file.
    issalarg@ics01:>more /etc/hosts
    ...
    # webservers
    192.168.5.112  ics01-qfe0-v3        # www.dom01.com
    192.168.5.113  ics01-qfe1-v3        # www.dom02.com
    192.168.5.113  ics01-qfe2-v3        # www.dom03.com
    ...
    
  3. Copy the homepage.
    larg@xcl01:~$ wget http://www.planetlarg.net/
    --2011-09-22 10:45:09--  http://www.planetlarg.net/
    Resolving www.planetlarg.net... 212.110.184.69
    Connecting to www.planetlarg.net|212.110.184.69|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [text/html]
    Saving to: `index.html'
    
        [ <=>                     ] 20,654      --.-K/s   in 0.04s
    
    2011-09-22 10:45:15 (452 KB/s) - `index.html' saved [20654]
    
    larg@xcl01:~$
    
  4. Close the CLI.