Setting the LAMP Stack

Setting the LAMP Stack

MAMP Pro makes it easy to set up local development environments. XAMP is a no-go because it doesn't have a feature to support different PHP versions out of the box. The safe choice for me if I had to install different PHP versions was to use what is native to the OS.

$ sudo apt-get update

$ sudo apt-get install lamp-server^

# Enable localhost:
$ sudo gedit /etc/apache2/conf-available/fqdn.conf
> ServerName localhost
$ sudo a2enconf fqdn


# Change the localhost's folder location:
$ sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/local.conf

$ sudo gedit /etc/apache2/sites-available/local.conf


# Change the folder location path to where you want it to be
$ sudo a2dissite 000-default && sudo a2ensite local

$ service apache2 restart