Advertisement
Guest User

Untitled

a guest
May 24th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.90 KB | None | 0 0
  1.         location / {
  2.                 root   /opt/webapp/htdocs;
  3.                 index index.php;
  4.  
  5.                 # if file exists return it right away
  6.                 if (-f $request_filename) {
  7.                         break;
  8.                 }
  9.  
  10.                 # otherwise rewrite the fucker
  11.                 if (!-e $request_filename) {
  12.                         rewrite ^(.+)$ /index.php last;
  13.                         break;
  14.                 }
  15.  
  16.         }
  17.  
  18.         # if the request starts with our frontcontroller, pass it on to fastcgi
  19.         location ~ index.php$
  20.         {
  21.                 include /opt/nginx/0.7.65/conf/fastcgi_params;
  22.                 fastcgi_pass 127.0.0.1:9000;
  23.                 fastcgi_param SCRIPT_FILENAME /opt/webapp/htdocs$fastcgi_script_name;
  24.                 fastcgi_param PATH_INFO $fastcgi_script_name;
  25.                 fastcgi_param QUERY_STRING $query_string;
  26.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement