Created
December 8, 2016 07:30
-
-
Save Epigene/add30e4779daf6ddbdced8556a5a06fe to your computer and use it in GitHub Desktop.
A sample nginx server block. How are assets served?
This file contains hidden or 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
server { | |
listen 37.139.8.70:443 ssl; | |
server_name app.easygodiet.com; | |
ssl on; | |
ssl_certificate /etc/ssl/app.easygodiet.com/app.easygodiet.com.crt; | |
ssl_certificate_key /etc/ssl/app.easygodiet.com/app.easygodiet.com.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_prefer_server_ciphers on; | |
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; | |
ssl_session_cache shared:SSL:30m; | |
ssl_session_timeout 30m; | |
root /home/deployer/apps/shproduct/current/public; | |
include includes/bot_denials; | |
include includes/cors_support; | |
location ~ ^/(assets)/ { | |
gzip_static on; | |
gzip_vary on; | |
expires max; | |
add_header Cache-Control public; | |
access_log /dev/null; | |
} | |
location ~ \.(php|aspx|asp|myadmin)$ { return 444; log_not_found off; } | |
try_files $uri/index.html $uri @puma; | |
location @puma { | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto https; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; | |
proxy_pass http://puma; | |
} | |
error_page 500 502 503 504 /500.html; | |
client_max_body_size 4G; | |
keepalive_timeout 10; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment