SHARE
TWEET

wordpress / nginx conf

a guest Apr 17th, 2012 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. server {
  3.         server_name domain.org www.domain.org;
  4.         listen [my ip];
  5.         root /home/domain/public_html;
  6.         index index.html index.htm index.php;
  7.         access_log /var/log/virtualmin/domain.org_access_log;
  8.         error_log /var/log/virtualmin/domain.org_error_log;
  9.         fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  10.         fastcgi_param SERVER_SOFTWARE nginx;
  11.         fastcgi_param QUERY_STRING $query_string;
  12.         fastcgi_param REQUEST_METHOD $request_method;
  13.         fastcgi_param CONTENT_TYPE $content_type;
  14.         fastcgi_param CONTENT_LENGTH $content_length;
  15.         fastcgi_param SCRIPT_FILENAME /home/domain/public_html$fastcgi_script_name;
  16.         fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  17.         fastcgi_param REQUEST_URI $request_uri;
  18.         fastcgi_param DOCUMENT_URI $document_uri;
  19.         fastcgi_param DOCUMENT_ROOT /home/domain/public_html;
  20.         fastcgi_param SERVER_PROTOCOL $server_protocol;
  21.         fastcgi_param REMOTE_ADDR $remote_addr;
  22.         fastcgi_param REMOTE_PORT $remote_port;
  23.         fastcgi_param SERVER_ADDR $server_addr;
  24.         fastcgi_param SERVER_PORT $server_port;
  25.         fastcgi_param SERVER_NAME $server_name;
  26.         location ^~ /files/ {
  27.                 rewrite /files/(.+) /wp-includes/ms-files.php?file=$1 last;
  28.         }
  29.         location @wordpress {
  30.                 fastcgi_pass localhost:9000;
  31.                 fastcgi_param SCRIPT_FILENAME $document_root/index.php;
  32.                 include /etc/nginx/fastcgi_params;
  33.                 fastcgi_param SCRIPT_NAME /index.php;
  34.         }
  35.         location ~ \.php$ {
  36.                 try_files $uri @wordpress;
  37.                 fastcgi_index index.php;
  38.                 fastcgi_pass localhost:9000;
  39.                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  40.                 include /etc/nginx/fastcgi_params;
  41.         }
  42.         location ^~ /blogs.dir/ {
  43.                 internal;
  44.                 root /home/domain/public_html/wp-content;
  45.         }
  46.         include /home/domain/public_html/nginx.conf;
  47.         fastcgi_read_timeout 60;
  48. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top