Skip to content

Instantly share code, notes, and snippets.

@urre
Created October 30, 2012 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urre/3982382 to your computer and use it in GitHub Desktop.
Save urre/3982382 to your computer and use it in GitHub Desktop.
Nginx configuration
# Generic startup file.
user www-data;
worker_processes 6;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
# Keeps the logs free of messages about not being able to bind().
#daemon off;
events {
worker_connections 6144;
}
http {
# rewrite_log on;
include mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
# tcp_nopush on;
keepalive_timeout 3;
# tcp_nodelay on;
gzip on;
gzip_types text/css text/javascript application/x-javascript application/json text/xml;
gzip_min_length 500;
gzip_comp_level 5;
fastcgi_buffer_size 32k;
fastcgi_buffers 256 4k;
client_max_body_size 13m;
index index.php index.html index.htm;
# Upstream to abstract backend connection(s) for PHP.
upstream php {
# server unix:/tmp/php-fpm.sock;
server 127.0.0.1:9000;
}
include sites-enabled/*;
# The default server.
server {
listen 80 default;
server_name everythingelse;
# Everything is a 404
location / {
return 404;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment