Skip to content

Instantly share code, notes, and snippets.

@alexnj
Created February 16, 2014 03:07
Show Gist options
  • Save alexnj/9028680 to your computer and use it in GitHub Desktop.
Save alexnj/9028680 to your computer and use it in GitHub Desktop.
nginx configuration
user nobody;
worker_processes 1;
error_log logs/error.log;
pid /opt/nginx/var/run/nginx;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server_tokens off;
client_max_body_size 13m;
gzip on;
gzip_comp_level 4;
gzip_static on;
gzip_proxied any;
gzip_types text/plain text/css application/x-javascript application/xml text/json application/json;
index index.php index.html index.htm;
upstream php {
server unix:/tmp/php-fpm.socket;
}
server {
listen 80 default;
server_name _;
server_name_in_redirect off;
location / {
root /opt/nginx/html;
index index.html index.htm;
}
}
include /opt/nginx/conf/sites/*.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment