Edit: Solution is in Nginx I disabled these: Cache Assets, Block Common Exploits, Websockets Support.

I can login using the local IP 192.168.1.2:9101, but when I route that with Nginx, It won't.

I have the GUI listen address as : 0.0.0.0:9101

I've been googling for hours but I can't find anything, In browser console it says

Failed to load resource: the server responded with a status of 403 ()
syncthing.my.domain.com/:1  Refused to execute script from 'https://syncthing.my.domain.com/meta.js' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.
you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 2 years ago (1 child)

Can you post the syncthing logs, as well as the nginx logs?

I assume you've seen this: https://stackoverflow.com/questions/48626459/refused-to-execute-script-because-strict-mime-type-checking-is-enabled

Can you post your nginx config? Is it just this one with different variables? https://docs.syncthing.net/users/reverseproxy.html

  • source
  • hideshow 2 child comments
  • [–] [S] 1 point 2 years ago (1 child)

    I'm using the Web GUI Nginx Proxy Manager https://nginxproxymanager.com/

    I tried to add what's in the docs.syncthing using the GUI but it failed, I wasn't sure if I should modify something inside the ngnix docker container or not.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 years ago (1 child)

    I'd definitely take a look at the syncthing logs...

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 2 years ago (1 child)

    The log doesn't mention anything regarding a login attempt

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 years ago (1 child)

    403 Forbidden doesn't necessarily mean a bad login attempt. Are you sure that's the error? My troubleshooting steps would be to access directly (no nginx), and look at the logs for a successful login. Then, look try to login with nginx, and look at those logs (both access.log and error.log on nginx, and any/all logs from syncthing). Find out where the two cases diverge and go from there.

    Does syncthing have a domain name specified? If it doesn't know its domain name it may work from IP directly but not via reverse proxy. Just a hunch.

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 2 years ago (1 child)

    In Syncthing logs the difference between success and fail

    Success

    2024-04-29 00:46:58 http: POST "/rest/noauth/auth/password": status 204, 0 bytes in 62.48 ms
    2024-04-29 00:46:58 http: GET "/rest/events?since=174": status 200, 240 bytes in 54538.81 ms
    2024-04-29 00:46:58 http: GET "/": status 304, 0 bytes in 0.00 ms
    2024-04-29 00:46:58 http: GET "/vendor/bootstrap/css/bootstrap.css": status 304, 0 bytes in 1.24 ms
    2024-04-29 00:46:58 http: GET "/vendor/daterangepicker/daterangepicker.css": status 304, 0 bytes in 0.00 ms
    2024-04-29 00:46:58 http: GET "/vendor/fork-awesome/css/fork-awesome.css": status 304, 0 bytes in 0.00 ms
    2024-04-29 00:46:58 http: GET "/assets/font/raleway.css": status 304, 0 bytes in 0.00 ms
    

    Fail

    2024-04-29 00:44:09 http: POST "/rest/noauth/auth/password": status 403, 10 bytes in 237.16 ms
    2024-04-29 00:44:09 http: GET "/modal.html": status 304, 0 bytes in 0.00 ms
    2024-04-29 00:44:09 http: GET "/syncthing/core/editShareTemplate.html": status 304, 0 bytes in 0.07 ms
    2024-04-29 00:44:10 http: POST "/rest/noauth/auth/password": status 204, 0 bytes in 85.43 ms
    2024-04-29 00:44:11 http: GET "/": status 304, 0 bytes in 0.00 ms
    2024-04-29 00:44:11 http: GET "/rest/svc/lang": status 200, 22 bytes in 0.00 ms
    

    Does syncthing have a domain name specified I can't find an option to do so

  • source
  • parent
  • hideshow 2 child comments