Advertisement
Guest User

Untitled

a guest
May 4th, 2012
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server {
  2.      listen       80;
  3.      server_name  sitename.com www.sitename.com;
  4.  
  5.      location /blog {
  6.              root   /www/sitename/new/htdocs/blog;
  7.              fastcgi_index  index.php;
  8.              fastcgi_pass 127.0.0.1:9000;
  9.              fastcgi_param SCRIPT_FILENAME /www/sitename/new/htdocs/blog$fastcgi_script_name;
  10.  
  11.              error_log /www/sitename/new/blog-error.log warn;
  12.      }
  13.  
  14.      location / {
  15.          root   /www/sitename/new/htdocs;
  16.          index  index.php;
  17.  
  18.          if (-f $request_filename) {
  19.              break;
  20.          }
  21.          if (!-f $request_filename) {
  22.              rewrite ^/(.*)$ /index.php?$1 last;
  23.              break;
  24.          }
  25.          error_log   /www/sitename/new/error.log warn;
  26.              }
  27.              location ~ \.php$ {
  28.                  set $php_root           /www/sitename/new/htdocs;
  29.                  fastcgi_pass   127.0.0.1:9000;
  30.                  fastcgi_index  index.php;
  31.                  fastcgi_param  SCRIPT_FILENAME  $php_root$fastcgi_script_name;
  32.                  include        fastcgi_params;
  33.              }
  34.              # deny access to apache .htaccess files
  35.              location ~ /\.ht
  36.              {
  37.                  deny all;
  38.              }
  39.          }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement