I have a server. One of its functions is SyncThing. This app has no per-user authorization, only admin. So I decided to run different Syncthing instances for each user.
For authorization process I would like to use unix user names and passwords (from /etc/passwd).
I imaging to use nginx as the reverse proxy and authorization verifier. Could you please verify my idea and help me with examples.
Sample services layout:
- Syncthing user1 listens on 127.0.0.1:8384
- Syncthing user2 listens on 127.0.0.1:8385
- Syncthing user3 listens on 127.0.0.1:8386
- Nginx (or other) listens on all interfaces including IPv6 on default HTTPS port 0.0.0.0:433
Address would be https://synxrage.local/syncthing. Port must never appear in URLs.
Depending on successfully authorized user proxy directs to different internal port and user sees his admin panel.