Skip to content

Instantly share code, notes, and snippets.

@urre
Created Oct 30, 2012
Embed
What would you like to do?
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