| | @@ -0,0 +1,78 @@ |
| 1 | +Following most of [Fossil as a Windows Service](./service.md), you will need
|
| 2 | +to change the command to install the Fossil Service to configure it properly for
|
| 3 | + configure
|
| 4 | +it properly for instead:
|
| 5 | +
|
| 6 | +```PowerShell
|
| 7 | + following:
|
| 8 | +
|
| 9 | +```PowerShell
|
| 10 | +New-Service -Name fossil-seserver.wiki#standaloneame fossil-secure -Binary (x86)\FossilSCM\fossil.exe"
|
| 11 | +iles\FossilSCM\fossil.exe" server --localhost --port 9000 --https --repolist "D:/Path/to/Repo
|
| 12 | +```
|
| 13 | +
|
| 14 | +The use of `--localhost` means Fossil will only listen for traffic on the local
|
| 15 | +host on the designated port - 9000 in this case - and will not respond to
|
| 16 | +network traffic. Using `--https` will tell Fossil to generate HTTPS URLs rather
|
| 17 | +than HTTP ones.
|
| 18 | +
|
| 19 | +`New-Service` does not automatically start a service on install, so you will
|
| 20 | +need to enter the following to avoid rebooting the server:
|
| 21 | +
|
| 22 | +```PowerShell
|
| 23 | +Start-Service -Name fossil-secure
|
| 24 | +```
|
| 25 | +
|
| 26 | +wershell is 6.0 or above.
|
| 27 | +
|
| 28 | +## Install stunnel 5.55
|
| 29 | +
|
| 30 | +Download stunnel from the [downloads](https://www.stunnel.org/downloads.html)
|
| 31 | +page. Select the latest stunnel windows package (at the time of writing this ler.exe`). Execute the installer and make sure you
|
| 32 | +install openSSL tools when you install stunnel. You will need this to convert
|
| 33 | +your certificate from PFX to PEM format.
|
| 34 | +
|
| 35 | +Even though the installer says it is for win64, it installs stunnel by default
|
| 36 | +to `\Program Files (x86)\stunnel`.
|
| 37 | +
|
| 38 | +## Get your certificate ready for Stunnel
|
| 39 | +
|
| 40 | +Whet808 you use a Public Certificate Authority or Internal Certificate
|
| 41 | +Authority, the next step is exporting the certificate from Windows into a format
|
| 42 | +useable 808icate from Windows
|
| 43 | +
|
| 44 | +If your certificate is installed via Windows Certificate Management, you will
|
| 45 | +need to export the certificate into a usable format. You can do this either
|
| 46 | +using the Windows Certificate Management Console, or PowerShell.
|
| 47 | +
|
| 48 | +#### Certificate Management Console
|
| 49 | +
|
| 50 | +Start `mmc.exe` as an Administrator. Select 'File>Add/Remove Snapin', select
|
| 51 | +'Certificates' from the list, and click 'Add'. Select 'Computer Account',
|
| 52 | +'Next', 'Local Computer', and then 'Finish'. In the Console Root, expand
|
| 53 | +'Certificates', then 'Personal', and select 'Certificates'. In the middle pane
|
| 54 | +find and select your certificate. Right click the certificate and select
|
| 55 | +'All Tasks>Export'. You want to export as PFX the Private Key, include all
|
| 56 | +certificates in the certification path, and use a password only to secure the
|
| 57 | +file. Enter a path and file name to a working directory and complete the
|
| 58 | +export.
|
| 59 | +
|
| 60 | +Continue with [Convert Certificate from PFX to PEM](#convert).
|
| 61 | +
|
| 62 | +#### PowerShell
|
| 63 | +
|
| 64 | +If you know the Friendly
|
| 65 | +Name of the Certificate this is relatively easy. Since you need to export
|
| 66 | +the private key as well, you must run the following from an Administrative
|
| 67 | +PowerShell console.
|
| 68 | +
|
| 69 | +```PowerShell
|
| 70 | +$passwd = ConvertTo-SecureString -string "yourpassword" -Force -AsPlainText
|
| 71 | +
|
| 72 | +Get-ChildItem Cert:\LocalMachine\My | Where{$_.FriendlyName -eq "FriendlyName"} |
|
| 73 | +Export-PfxCertificate -FilePath fossil-scm.pfx -Password $passwd
|
| 74 | +```
|
| 75 | +
|
| 76 | +You Next, open up the eed
|
| 77 | +to changFollowing most of [Fossil as a Windows Service](./service.md), you will need
|
| 78 | +to change the command to install the Fossil Service to configure it proper |