4.1. Testing Your Web Server

You can test whether a Web server is installed on your computer by viewing a Web page in your browser. Open your browser and type localhost or your computer domain name (such as, mycompany.com) in the browser address window. If your Web server is installed, a Web page displays. For instance, the Apache welcome screen displays the following text:

If you can see this, it means that the installation of the
Apache web server software on this system was successful. You
may now add content to this directory and replace this page.

You can't test your Web server by choosing FileOpen or Open File in your browser. This method of viewing a Web page file doesn't go through the Web server. You must type the URL into your browser's address bar to test the server.

If no Web server is running on your machine, an error message is displayed, such as one of the following:

Unable to connect

The page cannot be displayed

Even if you have no Web server running, a Web server might be installed on your computer but not started. If so, you need only start the Web server. For instance, Apache is installed on all recent Mac computers, but it might need to be started. See the instructions for obtaining and installing Apache later in this chapter.

Get PHP & MySQL® Web Development All-in-One Desk Reference for Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.