-
I tried a local installed Nginx instance with your nginx config, and it works fine. Can you please let me know the command you are using to start the LinuxServer.IO swag container?
-
Native nginx reverse proxy did work for me as well. All I did here was merge the host nginx site file with the swag format and include their boilerplate.
Swag compose:
services: swag: container_name: swag environment: - PUID=1000 - PGID=1000 - TZ=America/New_York - URL=example.com - VALIDATION=http - 'SUBDOMAINS=d,git,n,h,a' - [email protected] ports: - 4444:443 - 8081:80 volumes: - /media/storage/docker_configs/letsencrypt:/config restart: unless-stopped image: linuxserver/swagWhile the host port is 4444, the port forwarding in my router is 443->4444 on the host. I have another container that only functions in host networking and needs 443.
onedev compose:
services: server: container_name: onedev restart: always volumes: - /var/run/docker.sock:/var/run/docker.sock - /media/storage/docker_configs/onedev/:/opt/onedev ports: - 6610:6610 - 6611:6611 image: 1dev/server:latestThanks!
-
Then how to mount/merge your nginx config file? Should I prepopulate directory
/media/storage/docker_configs/letsencryptwith something first?I never used this container before. Checking the documentation and guessing the setup might be time consuming. A step-by-step reproducing guide will be of a lot help.
Also is http protocol working?
-
Reproducing steps with http protocol should be simpler if it does not work either.
-
Sorry about that! The swag container will auto-populated many directories under its
/config. After it does that, put the nginx config in my first post in the swag container's/config/nginx/proxy-confs/onedev.subdomain.confand restart the swag container. Swag won't start unless it can resolve the domain name you specify for it to get an SSL cert for.I redirect all http traffic to https just to not have to think about it but I'll reconfigure it as http tomorrow to see what happens.
-
Previous Value Current Value Open
Closed
-
Feel free to reopen if you tested with http protocol.
-
Btw, I figured this out and it was entirely on me. The http vs https thing was a red herring. The
proxy_passdirective in thelocationblock for/in my nginx config file didn't include$request_uriat the end so every request redirected to/which obviously doesn't work. -
Thanks for sharing.
| Type |
Question
|
| Priority |
Normal
|
| Assignee |
I'm running OneDev in a docker container. I also have the LinuxServer.IO swag container running my nginx instance. I modified the reverse proxy guide found here (https://docs.onedev.io/administration-guide/reverse-proxy-setup) to fit within the swag subdomain structure. That file looks like this:
If I access the OneDev instance directly on port 6610 at the appropriate local IP, everything works. When I connect via the external URL (https://git.example.com), my browser is infinitely redirected to
/~login. This appears to be entirely done inside the script in the HTML response to/.Am I missing something?
Thanks!