Skip to content

Instantly share code, notes, and snippets.

@attilahorvath
Created March 13, 2015 13:54
Show Gist options
  • Save attilahorvath/d1e23f0b34ad294abd0e to your computer and use it in GitHub Desktop.
Save attilahorvath/d1e23f0b34ad294abd0e to your computer and use it in GitHub Desktop.
Apache 2 config for Rails apps running on localhost
# /etc/apache2/users/user.conf
NameVirtualHost *:80
<Directory "/path/to/rails/apps/">
Options Indexes Multiviews Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
ServerName app.dev
DocumentRoot /path/to/rails/apps/app/public
ProxyRequests Off
ProxyVia Off
ProxyPass / http://localhost:3000/ retry=0
ProxyPassReverse / http://localhost:3000/
</VirtualHost>
# /etc/hosts
127.0.0.1 app.dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment