HP Open Source Middleware Stacks Blueprint: LAMP Architecture on HP ProLiant BladeSystem Servers on RHEL
NOTE: You must set a valid server host name prior to running an Apache HTTP Server to
avoid an error. The Apache configuration files are located in /etc/httpd/conf and the main
configuration file is httpd.conf.
1. Edit /etc/httpd/conf/httpd.conf and designate a valid hostname for the ServerName
directive using the following syntax:
ServerName <YOUR_HOSTNAME>:80
2. Restart Apache to force the changes to take effect by entering the following command:
# /etc/init.d/httpd restart
3. Verify that Apache starts successfully by verifying that messages similar to the following
appear in the /var/log/httpd/error_log log file:
[Thu May 10 11:25:14 2007] [notice] Apache/2.2.3 (Red Hat) configured
-- resuming normal operations
4. Create a file named /var/www/html/apache.html and add the following lines:
<HTML>
<HEAD>
</HEAD>
<BODY DIR="LTR">
<P ALIGN=CENTER STYLE="margin-bottom: 0cm">
<FONT FACE="Times New Roman, serif">
<FONT SIZE=6>Apache http server worked !</FONT>
</FONT></P>
</BODY>
</HTML>
Verify the Apache installation by opening a browser and entering the following website:
http://<YOUR_WEB_SERVER_IP>apache.html
The following message appears:
Apache HTTP server worked !
Advanced Apache HTTP Server Features
The following section describes several widely used Apache HTTP Server features.
Using the Apache HTTP Server Benchmarking Tool
The benchmarking tool is supplied with the Apache HTTP Server and is used to benchmark your
Apache HTTP Server and monitor its performance. For example, you can use the benchmarking
tool to perform concurrency requests to an Apache HTTP Server.
To start the benchmaking tool, use the command /usr/bin/ab. Additionally, you can verify
the stability of the Apache HTTP Server by running a basic stress test on the test system.
The following procedure shows you how to conduct a stress test for an example system.
1. Create a file using the following path name: /var/www/html/abtest.html
2. Add the following lines to the file you created in Step 1:
<HTML>
<HEAD>
</HEAD>
<BODY DIR="LTR">
<P ALIGN=CENTER STYLE="margin-bottom: 0cm">
<FONT FACE="Times New Roman, serif">
<FONT SIZE=6>The page is used for Apache benchmarking test !</FONT>
</FONT>
</P>
10