mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
(wiki): Add SSL conf
This commit is contained in:
parent
c76559a4d4
commit
2351b733cd
1 changed files with 35 additions and 0 deletions
35
wiki/ssl.md
Normal file
35
wiki/ssl.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Set up the SSL Certificates
|
||||
|
||||
|
||||
Follow this instructions to configure a SSL certificate to serve NPM registry under HTTPS.
|
||||
|
||||
* Update the listen property in your `~/.config/verdaccio/config.yaml`:
|
||||
|
||||
````
|
||||
listen: 'https://your.domain.com/'
|
||||
````
|
||||
|
||||
Once you update the listen and try to run verdaccio again will ask for certificates.
|
||||
|
||||
* Generate your certificates
|
||||
|
||||
````
|
||||
$ openssl genrsa -out ~/.config/verdaccio/verdaccio-key.pem 2048
|
||||
$ openssl req -new -sha256 -key ~/.config/verdaccio/verdaccio-key.pem -out ~/.config/verdaccio/verdaccio-csr.pem
|
||||
$ openssl x509 -req -in ~/.config/verdaccio/verdaccio-csr.pem -signkey ~/.config/verdaccio/verdaccio-key.pem -out ~/.config/verdaccio/verdaccio-cert.pem
|
||||
````
|
||||
|
||||
* Edit your config file `~/.config/verdaccio/config.yalm` an add the following section
|
||||
|
||||
````
|
||||
https:
|
||||
key: ~/.config/verdaccio/server.key
|
||||
cert: ~/.config/verdaccio/server.crt
|
||||
ca: ~/.config/verdaccio/server.ca
|
||||
````
|
||||
|
||||
* Run `verdaccio` in your command line.
|
||||
|
||||
* Open the browser and load `https://your.domain.com:port/`
|
||||
|
||||
This instructions are mostly valid under OSX and Linux, on Windows the paths will vary but, the steps are the same.
|
Loading…
Reference in a new issue