Skip to content

Instantly share code, notes, and snippets.

@RafaelKa
Last active December 22, 2015 08:19
Show Gist options
  • Save RafaelKa/7302c4e934c13a710694 to your computer and use it in GitHub Desktop.
Save RafaelKa/7302c4e934c13a710694 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
ServerName local.dev
<Directory /srv/projects/*/workingspace>
AllowOverride None
Require all denied
</Directory>
<Directory /srv/projects/*/workingspace/www >
AllowOverride All
Require all granted
</Directory>
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
AliasMatch ^/projects/([^/]*)/(.*) /srv/projects/$1/workingspace/www/$2
RewriteEngine on
RewriteMap FPM_PORTS txt:/etc/apache2/fpm-socket-ports-by-project-name.txt
RewriteRule ^/projects/([^/]*)/(.*\.php(/.*)?)$ fcgi://127.0.0.1:${FPM_PORTS:$1}/srv/projects/$1/workingspace/www/$2 [P]
</VirtualHost>
affenpuzzle 9025
euromuenzen 9026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment