Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- set $subdomain domain;
- server_name domain.com;
- set $index index.php;
- index $index;
- root /var/www/$subdomain/public/;
- access_log off;
- error_log /var/log/nginx/domain.log debug;
- gzip_comp_level 5;
- gzip on;
- gzip_disable "msie6";
- gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
- location @rewrites {
- rewrite ^/(.*)$ /$index last;
- }
- location / {
- charset utf-8;
- try_files $uri $uri/ @rewrites;
- }
- location ~ \.php$ {
- fastcgi_pass unix://var/run/php/php7.1-fpm.sock;
- fastcgi_index $index;
- fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
- include fastcgi_params;
- break;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement