Backport from #499
fix installation page ssh domain unavilable
No, DOMAIN is correct, SSH_DOMAIN should be %(DOMAIN)s. If I see it correctly we won't set the DOMAIN anymore with that change.
Beside that this is not a bug and should not be backported to 1.0.1.
Installation page show this input is ssh domain, but it will update domain not ssh domain. Isn't it a bug?
There's no mention of SSH_DOMAIN here: https://gogs.io/docs/advanced/configuration_cheat_sheet
What is DOMAIN for, and what SSH_DOMAIN ? Why are both needed ?
Don't know why. Maybe someone use different domain for HTTP and SSH. But this PR is really work.
But the form only asks for DOMAIN, not SSH_DOMAIN ?
In that case we should set both variables to the value provided via the form, no ?
Or SSH_DOMAIN should default to the value of DOMAIN if empty...
; Domain name to be exposed in clone URL
SSH_DOMAIN = %(DOMAIN)s
This PR is invalid 😕
The reason for SSH_DOMAIN vs DOMAIN is that you might have the webui running behind a loadbalancer/proxy on company.com/git that points to git.company.com, but ssh can't be used in such a manner so then you'd need to point to git.company.com
Please see the installation page, there are Domain:This affects SSH clone URLs. and Application URL:This affects HTTP/HTTPS clone URL and somewhere in email.. So when domain inputed value, which one should we change?
This affects SSH clone URLs.
This affects HTTP/HTTPS clone URL and somewhere in email.
Sounds like the Domain in the installation page really refers to SSH Domain then.
But then again what's the difference between ROOT_URL and DOMAIN in the settings ?
Who uses DOMAIN and how ? Is it about email domain ? Should it be also set at installation time ?
Feels like someone has to go through the install-page and see what needs to be improved, it feels slightly confusing as it is now