Starting and Stopping Apache


Now you've installed Apache with its default configuration. SUSE Linux provides a default home page, /srv/www/htdocs/index.html, in English and several other languages to test whether Apache is working properly. The proper way to run Apache is to have the web server run after booting, network configuration, and any firewall loading. The YaST Runlevel Editor takes care of this for you. This module is located on the YaST System page. See "Using the Runlevel Editor" in Chapter 22, "Managing the Boot Process and Other Services."

Tip

In the Advanced mode of the Runlevel Editor, make sure Apache is set to load at Runlevels 3 and 5.


After that is done, open any browser to http://localhost. If you have installed the sample pages package, you should see Figure 26.1.

Figure 26.1. If Apache is installed correctly, you'll get this test page when pointing a browser to http://localhost.


You can also use a wrapper script, apachectl, to start and stop the Apache server without having to reboot the entire machine. This comes in handy when you tweak httpd's configuration and need to restart the service for the changes to take effect. The script is found in the same directory as the httpd binary and in its simplest incantation, followed by start, restart, graceful, or stop:

./apachectl start 

Intuitively, start and stop will start and stop the server, respectively. You can use restart to stop and immediately start the server again, or use graceful to give Apache a chance to finish any tasks it's performing before stopping (a graceful stop).



SUSE Linux 10 Unleashed
SUSE Linux 10.0 Unleashed
ISBN: 0672327260
EAN: 2147483647
Year: 2003
Pages: 332

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net