Skip to content

Instantly share code, notes, and snippets.

@jancuk
Last active November 11, 2015 15:53
Show Gist options
  • Select an option

  • Save jancuk/4aaf8cbeaaddbc0c3032 to your computer and use it in GitHub Desktop.

Select an option

Save jancuk/4aaf8cbeaaddbc0c3032 to your computer and use it in GitHub Desktop.
upstream api {
server unix:/Users/azhar/code/fighting/puma_s/tmp/sockets/api.sock fail_timeout=0;
}
server{
listen 80;
server_name pumaa.com;
error_log /var/log/nginx/nginx_error.log;
# location /doc {
# alias /Users/azhar/code/fighting/puma_s/doc/app;
# auth_basic "Restricted";
# auth_basic_user_file /Users/azhar/code/fighting/puma_s/.htpasswd;
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# }
location / {
root /Users/azhar/code/fighting/puma_s/public;
proxy_pass http://api ;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /favicon.ico {
alias /Users/azhar/code/fighting/puma_s/public/favicon.ico;
}
location ~ ^/(assets|system|uploads)/ {
root /Users/azhar/code/fighting/puma_s/public;
gzip_static on;
expires max;
add_header Cache-Control public;
# access_log /dev/null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment