Advertisement
Guest User

Untitled

a guest
Jan 11th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.32 KB | None | 0 0
  1. server {
  2.     server_name devel.newfinder.ru;
  3.  
  4.     set $root '/home/<USERNAME>/projects/newfinder/public/';
  5.    
  6.     root $root;
  7.  
  8.     index index.php index.html;
  9.  
  10.     listen 80;
  11.     listen [::]:80;
  12.  
  13.     access_log /var/log/nginx/devel.newfinder.ru.access.log;
  14.     error_log /var/log/nginx/devel.newfinder.ru.error.log;
  15.  
  16.     charset utf-8;
  17.     client_max_body_size 30M;
  18.     fastcgi_read_timeout 1800;
  19.    
  20.     location @phalcon {
  21.         rewrite ^(.*)$ /index.php?_url=$1;
  22.     }
  23.  
  24.     location / {
  25.         try_files $uri $uri/ /index.php?_url=$uri&$args;
  26.         #try_files $uri $uri/ @phalcon;
  27.     }
  28.     location ~ \.php$ {
  29.         try_files $uri =404;
  30.        
  31.         include fastcgi_params;
  32.         fastcgi_split_path_info ^(.+\.php)(.*)$;
  33.         fastcgi_pass   127.0.0.1:7777;
  34.         fastcgi_index  index.php;
  35.         fastcgi_ignore_client_abort on;
  36.         fastcgi_param SERVER_NAME $http_host;
  37.         fastcgi_param PATH_INFO       $fastcgi_path_info;
  38.         fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  39.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  40.     }
  41.  
  42.     location ~ /\.ht {
  43.         deny  all;
  44.     }
  45.     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
  46.         #expires       max;
  47.         log_not_found off;
  48.         access_log    off;
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement