HP Open Source Middleware Stacks Blueprints: LAMP Architecture on HP ProLiant BladeSystem Servers on SLES
The APACHE_MODULES definition should now look like the following:
APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile
authz_default authz_user authn_dbm autoindex cgi dir env expires include
log_config mime negotiation setenvif ssl suexec userdir php5 info status
proxy proxy_connect proxy_ftp proxy_http"
3. On the second system, which acts as the Apache Proxy server, edit the following file: /etc/
apache2/default-server.conf
Add the following lines to the preceding file:
ProxyRequests On
ProxyVia On
<Proxy *>
Order deny,allow
Deny from all
Allow from all
</Proxy>
4. For the preceding changes to take effect, restart your second Apache HTTP server by entering
the following command:
# /etc/init.d/apache2 restart
5. Using the benchmarking tool, test the Apache Proxy server using the third system, which
acts as the web client:
# ab2 -c 10 -n 10 -X <YOUR_PROXY_SERVER_IP>:80 \
http://<YOUR_WEB_SERVER>/test.html
6. View the access log file on the Apache Proxy server. Messages similar to the following are
contained in the file:
YOUR_WEB_BROSWER_IP - - [11/May/2007:15:51:13 +0800]
"GET http://YOUR_WEB_SERVER_IP/test.html HTTP/1.0"
200 206 "-" "ApacheBench/2.0.40-dev"
View the access log file on the Apache HTTP server.
Messages similar to the following are contained in the file:
YOUR_PROXY_SERVER_IP - - [11/May/2007:16:05:19 +0800]
"GET http://YOUR_WEB_SERVER_IP/test.html HTTP/1.0"
200 206 "-" "ApacheBench/2.0.40-dev"
These messages verify that the Apache Proxy server configuration is successful.
Error Responses and Redirects
The following three types of error responses can be customized and are addressed in this section:
• Plain text
• Local URL redirect
• External URL redirect
Customizing Plain Text Responses
The following is an example of how to customize a plain text error response:
1. Edit the /etc/apache2/errors.conf file by changing (or adding if it does not exist
already) the following line:
ErrorDocument 404 "The page you requested does not exist! Plain
2. Restart your Apache HTTP server for the changes take effect.
Installing, Configuring, and Managing LAMP Middleware Stack Components 17