Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.83 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.     set $subdomain domain;
  4.     server_name domain.com;
  5.     set $index index.php;
  6.     index $index;
  7.     root /var/www/$subdomain/public/;
  8.     access_log off;
  9.     error_log /var/log/nginx/domain.log debug;
  10.     gzip_comp_level 5;
  11.     gzip on;
  12.     gzip_disable "msie6";
  13.     gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
  14.  
  15.     location @rewrites {
  16.       rewrite ^/(.*)$ /$index last;
  17.     }
  18.  
  19.     location / {
  20.       charset utf-8;
  21.       try_files $uri $uri/ @rewrites;
  22.     }
  23.  
  24.     location ~ \.php$ {
  25.       fastcgi_pass unix://var/run/php/php7.1-fpm.sock;
  26.       fastcgi_index $index;
  27.       fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
  28.       include fastcgi_params;
  29.       break;
  30.     }
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement