Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- user www-data www-data;
- worker_processes 1;
- events {
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- sendfile on;
- keepalive_timeout 65;
- server {
- listen 80;
- server_name sitename.com www.sitename.com;
- location /blog/ {
- root /www/sitename/new/htdocs/blog;
- index index.php;
- internal;
- if (!-e $request_filename) {
- rewrite ^.+?(/.*\.php)$ /blog$1 last;
- rewrite ^.+?(/wp-.*) /blog$1 last;
- rewrite ^ /blog/index.php last;
- }
- location / {
- root /www/sitename/new/htdocs;
- index index.php;
- if (-f $request_filename) {
- break;
- }
- if (!-f $request_filename) {
- rewrite ^/(.*)$ /index.php?$1 last;
- break;
- }
- error_log /www/sitename/new/error.log warn;
- }
- location ~ \.php$ {
- set $php_root /www/sitename/new/htdocs;
- if ($request_uri ~ /blog) {
- set $php_root /www/sitename/new/htdocs/blog;
- }
- fastcgi_split_path_info ^(/blog)(/.*)$;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $php_root$fastcgi_script_name;
- include fastcgi_params;
- }
- #deny access to apache .htaccess files
- location ~ /\.ht
- {
- deny all;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement