Skip to content

Instantly share code, notes, and snippets.

@rsboarder
Created October 1, 2014 17:14
Show Gist options
  • Save rsboarder/feae1ae6dc605ed1be28 to your computer and use it in GitHub Desktop.
Save rsboarder/feae1ae6dc605ed1be28 to your computer and use it in GitHub Desktop.
plurch conf
user root wheel;
worker_processes 1;
error_log /var/log/nginx/error.log;
error_log /var/log/nginx/error.log notice;
error_log /var/log/nginx/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include 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 0;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name localhost;
root /Users/rsboarder/Dropbox/workspace/web/;
access_log /var/log/nginx/rs.access.log main;
error_log /var/log/nginx/rs.error.log debug;
client_max_body_size 60m;
######Proxy headers
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-HTTPS $http_https;
location ~* ^/(i|css|j|fonts)/ {
root /Users/rsboarder/Dropbox/workspace/web/public/files;
access_log /var/log/nginx/local.access.log main;
expires +24h;
add_header Cache-Control public;
}
location / {
proxy_pass http://rs.dev.plurch.com;
access_log /var/log/nginx/server.access.log main;
proxy_set_header Authorization "Basic bXo6M2U0cjV0";
# a2luZzppc25ha2Vk" is "user:password" base64 encoded,
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment