Skip to content

Instantly share code, notes, and snippets.

@agungsijawir
Created February 10, 2017 17:14
Show Gist options
  • Save agungsijawir/5dff5100949aa2d36e1e836a7fd7d082 to your computer and use it in GitHub Desktop.
Save agungsijawir/5dff5100949aa2d36e1e836a7fd7d082 to your computer and use it in GitHub Desktop.
vhost_workshop.conf
# ************************************
# Vhost template for workshop yii2
# stack: apache2.4 + php7.0-fpm
# ************************************
<VirtualHost *:80>
## domain name, use for development only
## map this domain and this machine IP to your 'hosts' file
ServerName workshop.dev
## Vhost docroot for front-end application
DocumentRoot "/var/www/workshop_yii2/frontend/web"
<Directory "/var/www/workshop_yii2/frontend/web">
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted
<FilesMatch "\.php$">
Require all granted
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
</Directory>
## Alias declarations for resources outside the DocumentRoo
## this case, for admin (backend) application
Alias /admin "/var/www/workshop_yii2/backend/web"
<Directory "/var/www/workshop_yii2/backend/web">
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted
<FilesMatch "\.php$">
Require all granted
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
</Directory>
## Logging
ErrorLog "/var/log/apache2/workshop_yii2_error.log"
CustomLog "/var/log/apache2/workshop_yii2_access.log" combined
## Server aliases
ServerAlias www.workshop.dev
## Additional Settings
ServerSignature Off
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment