Skip to content

Instantly share code, notes, and snippets.

@nullren
Created February 4, 2012 07:58
Show Gist options
  • Save nullren/1736287 to your computer and use it in GitHub Desktop.
Save nullren/1736287 to your computer and use it in GitHub Desktop.
nginx configs i have
user http;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
gzip on;
include servers/*.conf;
}
server {
listen 80;
server_name .website.com;
root /srv/http/website.com/www;
index index.html index.htm index.php;
access_log /srv/http/website.com/logs/access.log;
error_log /srv/http/website.com/logs/error.log;
include "servers/typical.shit";
}
location @fallback {
root /srv/http/default;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
try_files /50x.html @fallback;
internal;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment