在您安装完 HTTPd 后,以 root 用户身份登录,然后输入 httpd & 启动它。(假设您以独立模式安装)现在您应该能够在 ps 生成的列表中看到它。测试 HTTPd 最简单的方法是使用 Telnet。在 Linux 命令提示符下输入
linux:~$ telnet 172.16.0.1 80
其中 80 是 HTTP 的默认端口。如果您将“Port”配置为其他值,则输入该数字代替。您应该收到类似于以下内容的响应
Trying 172.16.0.1...
Connected to linux.mydomain.
Escape character is '^]'.
现在,如果您输入任何字符并按 Enter 键,您应该会收到类似于下面显示的响应。
HTTP/1.0 400 Bad Request
Date: Wed, 10 Jan 1996 10:24:37 GMT
Server: NCSA/1.5
Content-type: text/html
<HEAD><TITLE>400 Bad Request < /TITLE> < /HEAD>
<BODY><H1>400 Bad Request < /H1>
Your client sent a query that this server could
not understand.<P>
Reason: Invalid or unsupported method.<P>
< /BODY>
现在我们准备好使用另一台 PC 和 WWW 浏览器连接到此服务器了。