Skip to content

Instantly share code, notes, and snippets.

@victorcreed
Forked from benolee/howto_pow_ubuntu.txt
Created May 12, 2013 19:41
Show Gist options
  • Save victorcreed/5564645 to your computer and use it in GitHub Desktop.
Save victorcreed/5564645 to your computer and use it in GitHub Desktop.
$ sudo aptitude install apache2 dnsmasq
$ sudo vim /etc/dnsmasq.conf
# ...
address=/dev/127.0.0.1
listen-address=127.0.0.1
$ sudo vim /etc/dhcp3/dhclient.conf
# uncomment line 20:
prepend domain-name-servers 127.0.0.1;
$ sudo vim /etc/resolv.conf
# put this nameserver above the others:
nameserver 127.0.0.1
# other nameservers...
$ sudo /etc/init.d/dnsmasq restart
$ sudo vim /etc/apache2/sites-available/your-user-name-here
NameVirtualHost *:80
<Directory "/home/your-user-name-here/.devsites/">
Options Indexes MultiViews FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
UseCanonicalName off
VirtualDocumentRoot /home/your-user-name-here/.devsites/%0/public
</VirtualHost>
$ cd /etc/apache2/mods-enabled/ && sudo ln -s /etc/apache2/mods-avalable/vhost_alias.load vhost_alias.load
$ mkdir -p ~/.devsites/test.dev/public && echo "hello world from test.dev!" > ~/.devsites/test.dev/public/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment