Skip to content

Instantly share code, notes, and snippets.

@michaelhoang
Created November 11, 2014 01:56
Show Gist options
  • Save michaelhoang/de80814a12b1fa728212 to your computer and use it in GitHub Desktop.
Save michaelhoang/de80814a12b1fa728212 to your computer and use it in GitHub Desktop.
Vagrant Vhost Apache
#Vhost in Apache 2
<VirtualHost *:80>
ServerName netshirt.local
## Vhost docroot
DocumentRoot "/var/www/netshirt"
## Directories, there should at least be a declaration for /var/www/netshirt
<Directory "/var/www/netshirt">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
## SetEnv/SetEnvIf for environment variables
SetEnv APP_ENV dev
## Custom fragment
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/netshirt/$1
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment