Skip to content

Instantly share code, notes, and snippets.

@bhargavg
Created August 10, 2014 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhargavg/723a54c4f30248b7a53b to your computer and use it in GitHub Desktop.
Save bhargavg/723a54c4f30248b7a53b to your computer and use it in GitHub Desktop.
LAMP setup
Change Document Root
====================
cd /etc/apache2/
sudo cp sites-available/000-default.conf sites-available/mysite.conf
sudo vim sites-available/mysite.conf
change DocumentRoot and add the following
<Directory /home/bhargav/Documents/htdocs/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
sudo a2dissite 000-default.conf && sudo a2ensite mysite.conf
sudo /etc/init.d/apache2 restart
UserGroups and Permissions
==========================
sudo vim envvars
change APACHE_RUN_USER=<your_name_here>
sudo usermod -a -G www-data <your_name_here>
sudo /etc/init.d/apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment