Closed sintaxx closed 3 years ago
In theory it should just work fine. I've never done reverse proxying with nginx. I can give it a try, if you give me your setup files (docker-compose.yml, conf.json, nginx.cond, etc).
@sintaxx could you post your current nginx configuration?
ok so i finally figured it out and it's working great, except for a couple things...
When i try to use the "download all mods" function i get a "502 bad gateway" error, i'll paste my proxy-conf for my FSM subdomain i think i need to add another location directive with /api in it? i'm not 100% sure.
also, if i try to upload a mod i get an error 'service not available' from FSM as well as getting the same error if i try to access "Logs"
server { listen 443 ssl; listen [::]:443 ssl;
server_name fsm.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
resolver 127.0.0.11 valid=30s;
set $upstream_app fsm;
set $upstream_port 80;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
}
}
here is the block from my docker-compose
factorio-server-manager: image: "ofsm/ofsm:latest" container_name: "fsm" hostname: fsm restart: "unless-stopped" environment:
We used to use nginx as the reverse proxy in the docker setup that might be useful to refer too. There was a separate location block for the /api
routes with a few extra proxy settings that you might want to give a shot.
Checkout the config here for reference: https://github.com/OpenFactorioServerManager/factorio-server-manager/blob/0.8.1/docker/nginx.conf
maybe related to #261?
Oh good point that 502 error is likely fixed in the latest develop container now.
@sintaxx have you had a chance to test the latest version to confirm your issue is resolved?
This should be fixed in the newest version, just reopen the issue if you're still running into this error.
i've decided to run OFSM without HTTPS/SSL because i've already a running docker start server a reverse proxy with SSL/TLS and i'm having troubles getting the OFSM UI to render correctly when it's served via a reverse proxy, can someone let me know what the required settings it needs might be ? such as proxy_set_headers, etc
i tried using proxy_set_header Content-Length ""; which fixed the weird page rendering issue but it won't accept any data such as the password, i get unexpected end of JSON input error