Installing Apache HTTP Server and PHP5 on Ubuntu

From the Terminal (press + SPACE and type terminal) you will run the following commands:
sudo apt-get install apache2
sudo apt-get install php5
sudo /etc/init.d/apache2 restart
Note: Your web folder is in "/var/www". If you restart the Apache HTTP Server you maybe get the following message:
* Restarting web server apache2                                                                                              apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
The solution to fix it is really simple, you just add the ServerName directive to "/etc/apache2/httpd.conf":
sudo vi /etc/apache2/httpd.conf
Add the line: ServerName localhost

Finally restart the Apache HTTP Server:
sudo /etc/init.d/apache2 restart
done!

0 Kommentare:

Post a Comment