Advertisement
Guest User

/etc/nginx/conf.d/default.conf

a guest
May 25th, 2017
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.89 KB | None | 0 0
  1. server {
  2.     listen       80;
  3.     server_name  localhost;
  4.     root  /usr/share/nginx/html;
  5.  
  6.     index  index.php index.html index.htm;
  7.  
  8.     try_files $uri $uri/ @rewrite;
  9.  
  10.     location @rewrite {
  11.         rewrite ^/(.*)$ /index.php?_url=/$1;
  12.     }
  13.  
  14.     location ~ \.php$ {
  15.         fastcgi_pass unix:/opt/remi/php56/root/var/run/php-fpm/www.sock;
  16.         #fastcgi_pass unix:/var/opt/remi/php70/run/php-fpm/www.sock;
  17.         fastcgi_index index.php;
  18.         include fastcgi_params;
  19.         fastcgi_split_path_info       ^(.+\.php)(/.+)$;
  20.         fastcgi_param PATH_INFO       $fastcgi_path_info;
  21.         fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  22.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  23.     }
  24.  
  25.     location ~* ^/(css|img|js|flv|swf|download)/(.+)$ {
  26.         root $root_path;
  27.     }
  28.     location ~ /\.ht {
  29.         deny all;
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement