HP Open Source Middleware Stacks Blueprint: LAMP Architecture on HP ProLiant BladeSystem Servers on RHEL

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 tester
# mkdir /home/tester/public_html
# chmod 755 /home/tester/public_html
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. Edit the /etc/httpd/conf/httpd.conf file and comment out the following line, if it
exists:
UserDir disable
Then, add the following lines:
UserDir enabled tester
UserDir public_html
4. Restart your Apache HTTP server for the changes to take effect.
5. 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:
1. Verify that the necessary PHP packages are installed by entering the following command:
# rpm q php php-pdo php-mysql
If any of these packages are not installed, locate the RPM package on the Linux distribution
media and install them.
18