Skip to content

Instantly share code, notes, and snippets.

@revathskumar
Created September 27, 2011 15:38
Show Gist options
  • Save revathskumar/1245412 to your computer and use it in GitHub Desktop.
Save revathskumar/1245412 to your computer and use it in GitHub Desktop.
Template for Virtualhost in apache on ubuntu
sudo a2ensites my-works
127.0.0.2 my-works
sudo vim /etc/apache2/sites-available/my-works
sudo touch /etc/apache2/sites-available/my-works
<VirtualHost 127.0.0.2:80>
ServerName my-works
ServerAdmin webmaster@localhost
DocumentRoot /home/phprepo/www/my-works
<Directory /home/phprepo/www/my-works/>
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment