Skip to content

Instantly share code, notes, and snippets.

@cbwar
Last active September 4, 2017 20:20
Show Gist options
  • Save cbwar/f293a0668b89ab225001afc1fabd5bcd to your computer and use it in GitHub Desktop.
Save cbwar/f293a0668b89ab225001afc1fabd5bcd to your computer and use it in GitHub Desktop.
Apache development config
<Macro Directory $dir>
<Directory "/home/dev/www/$dir">
# Projects location
Require all granted
Options Includes Indexes FollowSymLinks
AllowOverride All
</Directory>
</Macro>
<VirtualHost 127.0.0.1>
UseCanonicalName Off
ServerAdmin webmaster@localhost
# Access project via my-project.your.domain.com (on localhost)
ServerAlias *.your.domain.com
# Symlink the public dir (ln -s web public; ln -s htdocs public) in each project
VirtualDocumentRoot /home/dev/www/%1/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Use Directory *
<FilesMatch \.php$>
SetHandler proxy:fcgi://127.0.0.1:9090
</FilesMatch>
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment