From ce65cfff2348ed8a7e531e62c802df9a455d5747 Mon Sep 17 00:00:00 2001 From: Meeeeow Date: Wed, 19 Apr 2017 18:21:47 +0800 Subject: [PATCH] add docs about run behind proxy - Add docs about run behind proxy with different domain and port - Add server-side configure document link in README.md --- README.md | 2 ++ SERVER.md | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 48fbb6aea..839cffe35 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,8 @@ The original Sinopia puppet module [is available at puppet forge](http://forge.p When you start a server, it auto-creates a config file. +### See also: [server-side configure document](SERVER.md) + ## Adding a new user ```bash diff --git a/SERVER.md b/SERVER.md index 90f1495c1..ddd93a691 100644 --- a/SERVER.md +++ b/SERVER.md @@ -16,11 +16,20 @@ The 'cd ~' command send you to the home directory of the verdaccio user. Make su ## Listening on all addresses If you want to listen to every external address set the listen directive in the config to: -``` +```yaml # you can specify listen address (or simply a port) listen: 0.0.0.0:4873 ``` +## Run behind proxy with different domain and port +If you run verdaccio behind proxy, you may noticed all resource file served as relaticve path, like `http://127.0.0.1:4873/-/static`, you can resolve this by set `url_prefix` +```yaml +url_prefix: 'https://your-domain:8888' +# or +url_prefix: 'https://your-domain:8888/your-path' +``` +> Nginx or Apache configure? Please check out Wiki ;-) + ## Keeping verdaccio running forever We can use the node package called 'forever' to keep verdaccio running all the time. https://github.com/nodejitsu/forever