Skip to content

Instantly share code, notes, and snippets.

@maimai-swap
Created January 20, 2014 08:24
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 maimai-swap/ab6112fd59235d5d8fc8 to your computer and use it in GitHub Desktop.
Save maimai-swap/ab6112fd59235d5d8fc8 to your computer and use it in GitHub Desktop.
Amazon Web Service EC2 m1.large のnginx.conf
user nginx;
worker_processes 2;
worker_cpu_affinity 01 10;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
accept_mutex_delay 100ms;
}
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"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
keepalive_requests 31250;
include /etc/nginx/conf.d/*.conf;
server {
listen 80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
open_file_cache max=10000;
}
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;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment