Skip to content

Instantly share code, notes, and snippets.

@uranio-235
Created November 28, 2016 21:24
Show Gist options
  • Save uranio-235/68a7a5a205aba3087e222a619ca3f885 to your computer and use it in GitHub Desktop.
Save uranio-235/68a7a5a205aba3087e222a619ca3f885 to your computer and use it in GitHub Desktop.
[root@leviatan ~]# cat /etc/nginx/sites-enabled/rails
server {
# en que ip debe escuchar
listen 10.1.1.4:80;
# cual es el nombre del virutalhost
server_name rails.hcg.sld.cu;
# has proxy inverso para todo hacia 127.0.0.1 puerto 400
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
real_ip_header X-Forwarded-For;
proxy_pass http://127.0.0.1:4001;
proxy_redirect off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment