Skip to content

Instantly share code, notes, and snippets.

@alancoleman
Last active December 22, 2015 08:59
Show Gist options
  • Save alancoleman/6448835 to your computer and use it in GitHub Desktop.
Save alancoleman/6448835 to your computer and use it in GitHub Desktop.
Some basic BASH Apache admin for reference
//Create fqdn file in conf.d and add localhost
$ echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn
//File path and gedit to add vhost, so that it will resolve to localhost
sudo gedit /etc/hosts
//Restart Apache
$ sudo /etc/init.d/apache2 restart
// Sites available folder
/etc/apache2/sites-available
// Sites enabled folder
/etc/apache2/sites-enabled
// Deactivate a site
$ sudo a2dissite mysite
// Activate a site
$ sudo a2ensite mysite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment