Unverified Commit 3d8638f2 authored by iknowjason's avatar iknowjason Committed by GitHub
Browse files

Add files via upload

Added example nginx reverse proxy config for rails puma app server.
Showing with 50 additions and 0 deletions
+50 -0
upstream app {
server 127.0.0.1:3000;
}
server {
server_name prod.domain.com;
root /home/<username>/hammer/public;
try_files $uri @app;
location @app {
proxy_pass http://app;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
listen 443 ssl;
if ($scheme != "https") {
return 301 https://$host$request_uri;
}
ssl_certificate <PATH>
ssl_certificate_key <PATH>
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
if ($host = prod.domain.com) {
return 301 https://$host$request_uri;
}
listen 80;
server_name prod.domain.com
return 404;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment