Applies to: VisualSVN Server 3.6 and later
We strongly recommend that you always use the secure HTTPS protocol to access the repositories (even if you access your repositories in intranet). If you are using the HTTP protocol for some reason, then we recommend you to switch to the HTTPS protocol as soon as possible.
To help with the transition, VisualSVN Server provides an option that enables automatic redirection from http:// to https:// URLs. With this option enabled, all attempts to access the server via http:// will be automatically redirected to https://. This operation does not require relocating the working copies and works transparently for the end users, both with web browsers and native Subversion clients.
How to enable redirection from HTTP to HTTPS
You can enable the redirection from HTTP to HTTPS via the VisualSVN Server Manager console. Follow these steps:
- Start the VisualSVN Server Manager console.
- Click Action | Properties.
- Click the Network tab.
- Select the Automatically redirect HTTP to HTTPS (listen on port 80) checkbox.
- Click Apply.
Alternatively, you can use the Set-SvnServerConfiguration PowerShell cmdlet. To enable the redirection, run the following PowerShell command:
Set-SvnServerConfiguration -RedirectToHTTPS $True
Learn more about Set-SvnServerConfiguration cmdlet in the dedicated section of the article KB88: VisualSVN Server PowerShell Cmdlet Reference
How to redirect HTTP traffic from non-default port (other than port 80)
If you use the HTTP port that differs from the default port 80 (for example, your URL may look like http://example.com:8080/) and you want to enable redirection to HTTPS, then you need to change the redirection port number in the Windows Registry.
Follow these steps to change the HTTP to HTTPS redirection port via Windows Registry:
- On the server computer, start regedit.
- Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\VisualSVN\VisualSVN Server.
- Create a new REG_DWORD value named RedirectServerPort and set it to to the required TCP port to be used for the redirection. For example, port 8080.
- Make sure that the option Automatically redirect HTTP to HTTPS (listen on port 80) is enabled in VisualSVN Server Properties.
- Restart the VisualSVN Server services.
See also
KB195: Understanding TLS/SSL compatibility levels in VisualSVN Server
KB88: VisualSVN Server PowerShell Cmdlet Reference