On my vps I use primarily nginx for a php type forum. I also am running NodeBB (node.js) proxied through nginx. The point being port 80 belongs to nginx. I believe this will work, but I’d like some feedback.
app.xml
## which TCP/IP ports should this container expose?
expose:
- "81:80" # fwd host port 80 to container port 80 (http)
- "2222:22" # fwd host port 2222 to container port 22 (ssh)[/code]
nginx
[code]server {
listen 80;
server_name example.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:81/;
proxy_redirect off;
# Socket.IO Support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
I’m aware of that, but I don’t think you’ve answered my question (your post also got cut off)
Do you see the above configuration as a possible working solution? Discourse is not yet installed and I plan on using the above app.xml to install it. The nginx should then act as a proxy.
If you don’t know, please say you don’t know. That is a perfectly acceptable answer.
Let us know what prior research you’ve done in the future so we can skip recommending anything you might have already seen.
See:
Do you mean app.yml ? From my linked article:
So, I would say that while your proposed app.yml file might work, it would not be the preferred/supported method of doing what you’re trying to accomplish.
I do apologize. I’m new to discourse and your post appeared to be cut off. So from my limited perspective it originally appeared to offer no information.
The only question I really was asking was if my config looked like it would work or if anyone else had tried such a configuration?!
I decided to proceed forward and my config does work.
Understood, no hard feelings. Good luck with your setup. Do consider my warning though that while your method may work, you might encounter support issues that this community won’t be able to help you with because your setup is different than the one recommended by a Discourse team member.