Advertisement
Guest User

Untitled

a guest
May 3rd, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.96 KB | None | 0 0
  1. server {
  2.     listen 80;
  3.  
  4.     server_name admin.dev;
  5.  
  6.     index index.php index.html index.htm;
  7.  
  8.     root /home/php/workspace/project/private;
  9.  
  10.     try_files $uri $uri/ @rewrite;
  11.  
  12.     location @rewrite {
  13.         rewrite ^(.*)$ /index.php?_url=$1;
  14.     }
  15.  
  16.     location /api {
  17.         rewrite ^(.*)$ api/index.php?_url=$1;
  18.     }
  19.  
  20.     location ~ \.php {
  21.     #fastcgi_pass    backend-daevelfr;
  22.     fastcgi_pass unix:/var/run/php5-fpm.sock;
  23.  
  24.         fastcgi_index /index.php;
  25.  
  26.         include /etc/nginx/fastcgi_params;
  27.  
  28.         fastcgi_split_path_info       ^(.+\.php)(/.+)$;
  29.         fastcgi_param PATH_INFO       $fastcgi_path_info;
  30.         fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  31.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  32.     }
  33.  
  34.     location ~* ^(.*)/(css|img|js|flv|swf|download)/(.+)$ {
  35.         root /home/php/workspace/project/private;
  36.     }
  37.  
  38.     location ~ /\.ht {
  39.         deny all;
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement