o/
I'm really a newbie with Nginx proxying, can you provide a nginx.conf exemple please ?
Many thanks,
Sure, here you are
First you need to add upstream group which contain all your servers (one is ok too).
upstream io_nodes {
ip_hash;
server 127.0.0.1:3000;
}
And then put these in your server block
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_pass http://io_nodes;
proxy_cache_bypass $http_upgrade;
proxy_redirect off;
}
Then you are good to go.
Thank you very much !
@jackycute Would you mind adding this, preferably, to the CodiMD Documentation?
@jackycute Would you mind adding this, preferably, to the CodiMD Documentation?
Thanks for reminder, we've added the doc to https://hackmd.io/c/codimd-documentation/%2F%40codimd%2Fweb-server-nginx and now WIP.
Most helpful comment
Sure, here you are
First you need to add upstream group which contain all your servers (one is ok too).
And then put these in your server block
Then you are good to go.