Skip to content

Instantly share code, notes, and snippets.

@churnd
Created June 25, 2020 00:30
Show Gist options
  • Save churnd/1010ef2c407b43ebb1a9ea61b2ea153b to your computer and use it in GitHub Desktop.
Save churnd/1010ef2c407b43ebb1a9ea61b2ea153b to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name _;
root /var/canvas/public;
charset utf-8;
include mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/canvas.access.log;
error_log /var/log/nginx/canvas.error.log;
passenger_enabled on;
rails_env production;
location /rce {
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Authorization $http_authorization;
proxy_pass_header Authorization;
proxy_pass http://127.0.0.1:3000;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment