Skip to content

Instantly share code, notes, and snippets.

@kbrock
Created September 25, 2012 21:34
Show Gist options
  • Save kbrock/3784600 to your computer and use it in GitHub Desktop.
Save kbrock/3784600 to your computer and use it in GitHub Desktop.
nginx info
brew install nginx
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
#include mime.types;
#default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
#gzip on;
server {
listen 8080;
server_name localhost;
#access_log logs/host.access.log main;
location / {
index index.html index.htm;
autoindex on; #if the file is not found, do a directory listing
root /Users/kbrock/projects/nginx/static;
}
#error_page 404 /404.html;
}
}
/usr/local/sbin/nginx -c ~/projects/nginx/nginx.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment