3.2. Starting, Stopping, and Restarting Apache

If you installed Linux as suggested in Chapter 2, Apache should be running when you start your machine. To check, load this URL in your browser:

http://localhost/

You should see the Apache welcome page, as shown in Figure 3.2. If not, Apache may not be running. Not a major crisis—in fact, it’s a good thing if daemons such as Apache don’t run unless you explicitly start them. If Apache has been running since you booted and plugged in the TCP/IP connection, other services are probably running, and you should configure them as you wish, firewall them, or turn them off (see [Hatch+ 02]). To check whether Apache is running, try the following:

Figure 3.2. Apache welcome page

# ps ax | grep httpd

Get Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP 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.