Reverse proxy servers can only work locally (OD-2262)
ovsea opened 11 months ago

Hi,

I use nginx to proxy onedev. If nginx and onedev are in the same server, everything works fine, including the WEB and git clone http://url, but if my reverse proxy is in a different server, then the login fails.

I don't see any error messages, except nginx's logs says 401.

NGINX

Cloning into 'scm'...
Username for 'http://repo.ovsea.cfd': ovsea
Password for 'http://[email protected]': 
remote: You do not have permission to pull from this project.
fatal: Authentication failed for 'http://repo.ovsea.cfd/ovsea/scm/'
  • Robin Shen commented 11 months ago

    Seems you are proxying to a wrong onedev instance. Please check your config to make sure.

  • ovsea commented 11 months ago

    I have only one onedev installed, but I found a solution, which is to turn on nginx locally, and then the front-end proxy the nginx's http in backend, or https mapping the nginx's https, it will work, probably because the login environment valuea is not properly passed to onedev when using the different port crossing the server, maybe need some configutation.

  • Robin Shen commented 11 months ago

    Not sure what happens, but it works at my side without needing to install nginx side by side with OneDev.

  • ovsea changed state to 'Closed' 11 months ago
    Previous Value Current Value
    Open
    Closed
  • ovsea commented 11 months ago

    The problem was finally identified, nginx can't turn on caching, and if it did, it should skip url for checkout,push, pull

issue 1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-2262
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover