HP Open Source Middleware Stacks Blueprints: LAMP Architecture on HP ProLiant BladeSystem Servers on SLES
</BODY>
</HTML>
3. Restart the Apache HTTP server for the changes to take effect.
4. Verify the custom external URL redirect message by opening a browser and entering the
following website:
http://<YOUR_WEB_SERVER_IP>/non-exist
The following message appears:
The page you request does not exist! External redirects example
Using Per-User Web Directories
Using the UserDir function, each user is allowed to have a personal website in their home directory
on servers that have multiple users. Visiting a URL with its name in the form
http://example.com/~username displays the contents of the home directory of the user.
The following is an example for configuring per-user web directories:
1. Add a user named tester to your server by entering the following commands:
# useradd —m tester
2. Create an HTML file named /home/tester/public_html/index.html that contains
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>This is personal homepage of user tester .</FONT>
</FONT></P>
</BODY>
</HTML>
3. Verify that the per-user web directory configuration was successful by opening a browser
and entering the following website:
http://<YOUR_WEB_SERVER_IP>/~tester
The following message appears:
This is personal homepage of user tester.
Integrating LAMP Components
This section describes the commonly used configurations for the LAMP stack components. Before
you integrate Apache HTTP Server with PHP, Python, Perl and MySQL, verify that MySQL is
installed and started using the following procedure:
1. Verify that MySQL is installed by entering the following command:
# rpm -qa |grep -i mysql
2. Start the MySQL database and verify the daemon is started by entering the following
commands:
# /etc/init.d/mysql start
# ps –ef|grep mysqld
Integrating Apache HTTP Server with PHP and MySQL
Use the following procedure to configure PHP and MySQL:
Integrating LAMP Components 19