Advertisement
Guest User

Untitled

a guest
Jul 21st, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.15 KB | None | 0 0
  1. server {
  2.     listen   80;
  3.     server_name hellyer.net.nz *.hellyer.nz;
  4.     access_log /var/log/nginx/$host.access.log;
  5.     error_log /var/log/nginx/$host.error.log;
  6.     root   /srv/www/stuff.hellyer.net.nz/public_html;
  7.     client_max_body_size 20M;
  8.     index  index.html index.htm index.php;
  9.  
  10.     error_page 404 = @wordpress;
  11.  
  12.     location / {
  13.        
  14.         try_files $uri $uri/ /index.php?$args;
  15.    
  16.     }
  17.  
  18.     rewrite /wp-admin$ $scheme://$host$uri/ permanent;
  19.         rewrite ^/files/(.+) /wp-includes/ms-files.php?file=$1 last;
  20.  
  21.     location ^~ /files/ {
  22.     rewrite ^.*/files/(.+)$ /wp-includes/ms-files.php?file=$1 last;
  23.     }
  24.  
  25.     if (!-e $request_filename) {
  26.     rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
  27.     rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
  28.     }
  29.  
  30.  
  31.     location @wordpress {
  32.     fastcgi_pass 127.0.0.1:9000;
  33.     fastcgi_param SCRIPT_FILENAME $document_root/index.php;
  34.     include fastcgi_params;
  35.     fastcgi_param SCRIPT_NAME /index.php;
  36.     }
  37.  
  38.     location ~ \.php$ {
  39.         try_files $uri =404;
  40.         include fastcgi_params;
  41.         fastcgi_pass  127.0.0.1:9000;
  42.         fastcgi_index index.php;
  43.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  44.         try_files $uri @wordpress;
  45.     }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement