Skip to content

Instantly share code, notes, and snippets.

@baopham
Created June 5, 2012 17:14
Show Gist options
  • Save baopham/2876305 to your computer and use it in GitHub Desktop.
Save baopham/2876305 to your computer and use it in GitHub Desktop.
Apache notes

To set up a new domain name

$ sudo cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mynewsite
  • Change the line DocumentRoot /var/www/ to DocumentRoot /var/www/mynewsite

  • Create an alias in /etc/apache2/sites-enabled:

$ sudo a2ensite mynewsite
  • Create the folder:
$ sudo mkdir /var/www/mynewsite
  • Restart apache:
$ sudo service apache2 reload
  • Go to browser and enter localhost/mynewsite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment