Skip to content

Instantly share code, notes, and snippets.

@atnartur
Created August 5, 2014 19:14
Show Gist options
  • Save atnartur/f065cc2befaacabb2cd7 to your computer and use it in GitHub Desktop.
Save atnartur/f065cc2befaacabb2cd7 to your computer and use it in GitHub Desktop.
NGINX wordpress config
server {
root /example.com/www;
index index.php index.html index.htm;
server_name example.com;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php {
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REDIRECT_URL $request_uri;
}
location ~ /\.ht {
deny all;
}
client_body_timeout 30;
client_header_timeout 20;
keepalive_timeout 5 5;
send_timeout 10;
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment