Last active
December 10, 2016 07:27
-
-
Save maxd/5231139 to your computer and use it in GitHub Desktop.
sites-available/application.site
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proxy_cache_path /tmp/???_nginx_cache keys_zone=???:512m inactive=2w; | |
server { | |
listen 8081; | |
error_log /var/log/nginx/???.error.log error; | |
access_log /var/log/nginx/???.access.log; | |
root /apps/???/current/public; | |
passenger_enabled on; | |
rails_env production; | |
gzip on; | |
gzip_http_version 1.0; | |
gzip_comp_level 5; | |
gzip_min_length 256; | |
gzip_types application/json text/css application/javascript text/javascript application/x-javascript; | |
location ~* \.(js|css|png|ico) { | |
expires 30d; | |
} | |
} | |
server { | |
listen 80; | |
# server_name ???-api.example.com; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
location /media { | |
proxy_cache ???; | |
proxy_pass http://127.0.0.1:8081; | |
} | |
location / { | |
proxy_pass http://127.0.0.1:8081; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment