Skip to content

Instantly share code, notes, and snippets.

@notgosu
Created January 15, 2017 21:56
Show Gist options
  • Save notgosu/ddfa85d54b6cdd3baf133638c7fb5ca6 to your computer and use it in GitHub Desktop.
Save notgosu/ddfa85d54b6cdd3baf133638c7fb5ca6 to your computer and use it in GitHub Desktop.
server {
listen 80; # listen for IPv4
server_name vseprosto.dev;
root /Volumes/storage/work-web/www/yii2/vse-prosto;
#access_log off;
#error_log /dev/null crit;
charset utf-8;
client_max_body_size 100M;
location / {
root /Volumes/storage/work-web/www/yii2/vse-prosto/frontend/web/;
try_files $uri /frontend/web/index.php?$args;
}
location ~ \.php$ {
try_files $uri /frontend/web$uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_read_timeout 1000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~* \.(htaccess|htpasswd|svn|git) {
deny all;
}
location /admin {
alias /Volumes/storage/work-web/www/yii2/vse-prosto/backend/web/;
try_files $uri /backend/web/index.php?$args;
location ~* ^/admin/(.+\.php)$ {
try_files $uri /backend/web/$1?$args;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment