Skip to content

Instantly share code, notes, and snippets.

@youyo
Created January 29, 2013 06:47
Show Gist options
  • Save youyo/4662318 to your computer and use it in GitHub Desktop.
Save youyo/4662318 to your computer and use it in GitHub Desktop.
/etc/nginx/nginx.conf
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" '
'"$request_time"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 10;
gzip on;
server {
listen 80 default_server;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 404 /404.html;
location = /40x.html {
root /usr/share/nginx/html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
include /etc/nginx/conf.d/*.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment