Skip to content

Instantly share code, notes, and snippets.

@MioGreen
Created September 16, 2014 16:23
Show Gist options
  • Save MioGreen/e258a8b4d6dd11eb656f to your computer and use it in GitHub Desktop.
Save MioGreen/e258a8b4d6dd11eb656f to your computer and use it in GitHub Desktop.
#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;
#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 logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server {
listen 80;
server_name localhost;
root /home/;
#access_log /var/log/nginx/mz.access.log main;
#error_log /var/log/nginx/mz.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|h)/(.*) {
root /Users/miogreen/Development/plurch/web/public/files/;
# access_log /var/log/nginx/au.access.log main;
expires +24h;
add_header Cache-Control public;
}
location / {
proxy_pass http://mz.dev.plurch.com/;
# access_log /var/log/nginx/mz.access.log main;
proxy_set_header Authorization "Basic a2luZzppc25ha2Vk";
# a2luZzppc25ha2Vk" is "user:password" base64 encoded,
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment