Quin opened 2 years ago
|
|||||
Robin Shen changed state to 'Closed' 2 years ago
|
|||||
To achieve this, you may set up reverse proxy: https://code.onedev.io/projects/162/blob/main/pages/reverse-proxy-setup.md |
|||||
Quin changed state to 'Open' 2 years ago
|
|||||
I have already done the reverse proxy on the hypervisor, and it works externally to the network. But internally, I have to use the port 6610 in the URL, as I cannot set the port in the split DNS. Is there a way to overcome that (such as changing the port that OneDev uses to 80/443)? Do I have to setup a reverse proxy on the OneDev guest machine? |
|||||
Do you mean you've setup OneDev so that it can accessed via some external name, but that name can not be accessed in your internal network? If so, I think it is a problem of your network instead of OneDev. |
|||||
That is true, but I've resolved that issue using BIND9 and split DNS (because my router cannot handle hairpin NAT)., but that does not support port forwarding like the reverse proxy does. The issue remains with OneDev using port 6610, and I want to know if there is a way to change this. |
|||||
I still can not understand your problem here. Do you want to disable port 6610 so that no one can access it? |
|||||
No. Instead of using onedev.url:6610, I want to simply use onedev.url No port number involved. What if I already had a service running on port 6610? I wouldn't be able to use OneDev. |
|||||
You can change the port via "conf/server.properties". But specifying it as system port 80/443 is not recommended as it requires OneDev to be running as root. Also you will need to set up certificate separately for OneDev on 443 port, which is verbose. This is why I always suggest to set up reverse proxy for http/https traffic, and port forwarding for ssh traffic. I think the problem is quite general, and it is the same for other services (gitea/gitlab etc) as well. |
|||||
Quin changed state to 'Closed' 2 years ago
|
|||||
Closing, as using reverse proxy does work and using a VPN to give myself a different IP than the server. |
Type |
Question
|
Priority |
Normal
|
Assignee |
Not assigned
|
Similar to issue #658 (maybe related), internally, I can use a HTTP address with 6610 port number to access OneDev.
Externally, this doesn't work, but instead can use the HTTPS url.
On this setup, I have nginx running a reverse proxy, and Bind9 for a split DNS.
Can I change the port from 6610 to 80 or 443? This would make things so much simpler (and other guest machines seem to work fine "sharing" port 80).