LAMP setup on xubuntu
Quick code for installing the LAMP stack on xubuntu:
#Install SSH
sudo apt-get install openssh-server
#Install Apache
sudo apt-get install apache2
# apache should now return a response at http://127.0.1.1/
#likely not needed but for some reason a lot of sites reference it
sudo apt-get install libapache2-mod-auth-mysql
#Install MySQL
sudo apt-get install mysql-server
#Install php
sudo apt-get install php5
sudo apt-get install php5-mysql
sudo apt-get install libapache2-mod-php5
sudo apt-get install php-pear
#This one fails....not sure if it is needed.
sudo apt-get install php5-suhosin
#activate mod rewrite
sudo a2enmod rewrite
#activate vhost alias
sudo a2enmod vhost_alias
#install phpmyadmin
sudo apt-get install phpmyadmin
vhost setup - useful stuff
/etc/apache2/sites-enabled
A directory containing pointers to /etc/apache2/sites-available
/etc/hosts
A file containing the list of sites
apache2ctl -DUMP_VHOSTS
a command to reveal all registered vhosts
Location of php.ini
/etc/php5/apache2/php.ini
Restart apache
sudo service apache2 restart
Distilled from:
http://www.penguintutor.com/linux/installing-lamp
Vhost setup:
https://www.digitalocean.com/community/articles/how-to-set-up-apache-vir...
Error log location
/var/log/apache2/error.log
tail -f /var/log/apache2/error.log