Many times I have seen people are not able to install the Apache server properly under linux. Here are some simple steps to install Apache2 web server and Mysql server. Considering you have operating system as Ubuntu Linux. Just copy the following command and install the Apache2, PHP 5, Mysql5 Server and Mysql 5 client.
sudo apt-get install apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl libplrpc-perl libpq5 mysql-client-5.0 mysql-common mysql-server mysql-server-5.0 php5-common php5-mysql This will install the Complete Apache2 with php5 and mysql5 server support. Now you can made changes in apache2 server file as per the requirement. Also you can install the different versions of Mysql Server as you required.