Skip to content

Instantly share code, notes, and snippets.

@benolee
Created July 1, 2011 03:32
Show Gist options
  • Save benolee/1057816 to your computer and use it in GitHub Desktop.
Save benolee/1057816 to your computer and use it in GitHub Desktop.
HowTo Ubuntu pow-like setup
$ 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
@dpaluy
Copy link

dpaluy commented Jan 22, 2013

Small typo in line 36:

$ cd /etc/apache2/mods-enabled/ && sudo ln -s /etc/apache2/mods-available/vhost_alias.load vhost_alias.load

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment