asciinema.org/docker/nginx/asciinema.conf
2017-04-13 14:15:38 +02:00

29 lines
671 B
Plaintext

upstream rails-server {
server 127.0.0.1:3000 fail_timeout=0;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /app/public;
client_max_body_size 16m;
location / {
try_files $uri $uri/index.html $uri.html @rails;
}
location @rails {
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 $scheme;
proxy_set_header Host $http_host;
proxy_pass http://rails-server;
proxy_redirect off;
error_page 500 502 504 /500.html; # Rails error pages
}
}