mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-17 07:45:52 +01:00
0599f4e949
* New translations install.md (French) docs(website): new translations * New translations kubernetes.md (French) docs(website): new translations * New translations kubernetes.md (French) docs(website): new translations * New translations kubernetes.md (French) docs(website): new translations * New translations kubernetes.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations notifications.md (French) docs(website): new translations * New translations notifications.md (French) docs(website): new translations * New translations packages.md (French) docs(website): new translations * New translations packages.md (French) docs(website): new translations * New translations packages.md (French) docs(website): new translations * New translations packages.md (French) docs(website): new translations * New translations packages.md (French) docs(website): new translations * New translations packages.md (French) docs(website): new translations * New translations packages.md (French) docs(website): new translations * New translations protect-your-dependencies.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations reverse-proxy.md (French) docs(website): new translations * New translations reverse-proxy.md (French) docs(website): new translations * New translations server.md (French) docs(website): new translations * New translations config.md (Serbian (Latin)) docs(website): new translations * New translations config.md (Serbian (Latin)) docs(website): new translations * New translations config.md (Serbian (Latin)) docs(website): new translations * New translations config.md (Serbian (Latin)) docs(website): new translations * New translations config.md (Serbian (Latin)) docs(website): new translations * New translations config.md (Serbian (Latin)) docs(website): new translations * New translations config.md (Serbian (Latin)) docs(website): new translations * New translations config.md (Serbian (Latin)) docs(website): new translations * New translations contributing.md (Serbian (Latin)) docs(website): new translations * New translations contributing.md (Serbian (Latin)) docs(website): new translations * New translations contributing.md (Serbian (Latin)) docs(website): new translations * New translations contributing.md (Serbian (Latin)) docs(website): new translations * New translations dev-plugins.md (Serbian (Latin)) docs(website): new translations * New translations dev-plugins.md (Serbian (Latin)) docs(website): new translations * New translations dev-plugins.md (Serbian (Latin)) docs(website): new translations * New translations dev-plugins.md (Serbian (Latin)) docs(website): new translations * New translations dev-plugins.md (Serbian (Latin)) docs(website): new translations * New translations dev-plugins.md (Serbian (Latin)) docs(website): new translations * New translations docker.md (Serbian (Latin)) docs(website): new translations * New translations docker.md (Serbian (Latin)) docs(website): new translations * New translations docker.md (Serbian (Latin)) docs(website): new translations * New translations docker.md (Serbian (Latin)) docs(website): new translations * New translations docker.md (Serbian (Latin)) docs(website): new translations * New translations docker.md (Serbian (Latin)) docs(website): new translations * New translations iis-server.md (Serbian (Latin)) docs(website): new translations * New translations iis-server.md (Serbian (Latin)) docs(website): new translations * New translations iis-server.md (Serbian (Latin)) docs(website): new translations * New translations install.md (Serbian (Latin)) docs(website): new translations * New translations install.md (Serbian (Latin)) docs(website): new translations * New translations kubernetes.md (Serbian (Latin)) docs(website): new translations * New translations kubernetes.md (Serbian (Latin)) docs(website): new translations * New translations packages.md (Serbian (Latin)) docs(website): new translations * New translations packages.md (Serbian (Latin)) docs(website): new translations * New translations packages.md (Serbian (Latin)) docs(website): new translations * New translations packages.md (Serbian (Latin)) docs(website): new translations * New translations plugins.md (Serbian (Latin)) docs(website): new translations * New translations plugins.md (Serbian (Latin)) docs(website): new translations * New translations plugins.md (Serbian (Latin)) docs(website): new translations * New translations plugins.md (Serbian (Latin)) docs(website): new translations * New translations plugins.md (Serbian (Latin)) docs(website): new translations * New translations test.md (Serbian (Latin)) docs(website): new translations * New translations logger.md (Serbian (Latin)) docs(website): new translations * New translations notifications.md (Serbian (Latin)) docs(website): new translations * New translations node-api.md (Serbian (Latin)) docs(website): new translations * New translations logo.md (Serbian (Latin)) docs(website): new translations * New translations notifications.md (Serbian (Latin)) docs(website): new translations * New translations web.md (Serbian (Latin)) docs(website): new translations * New translations puppet.md (Serbian (Latin)) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations logger.md (Serbian (Latin)) docs(website): new translations * New translations logo.md (Serbian (Latin)) docs(website): new translations * New translations logo.md (Serbian (Latin)) docs(website): new translations * New translations notifications.md (Serbian (Latin)) docs(website): new translations * New translations node-api.md (Serbian (Latin)) docs(website): new translations * New translations logo.md (Serbian (Latin)) docs(website): new translations * New translations notifications.md (Serbian (Latin)) docs(website): new translations * New translations notifications.md (Serbian (Latin)) docs(website): new translations * New translations protect-your-dependencies.md (Serbian (Latin)) docs(website): new translations * New translations repositories.md (Serbian (Latin)) docs(website): new translations * New translations puppet.md (Serbian (Latin)) docs(website): new translations * New translations reverse-proxy.md (Serbian (Latin)) docs(website): new translations * New translations server.md (Serbian (Latin)) docs(website): new translations * New translations server.md (Serbian (Latin)) docs(website): new translations * New translations server.md (Serbian (Latin)) docs(website): new translations * New translations server.md (Serbian (Latin)) docs(website): new translations * New translations ssl.md (Serbian (Latin)) docs(website): new translations * New translations reverse-proxy.md (Serbian (Latin)) docs(website): new translations * New translations ssl.md (Serbian (Latin)) docs(website): new translations * New translations test.md (Serbian (Latin)) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations test.md (Serbian (Latin)) docs(website): new translations * New translations use-cases.md (Serbian (Latin)) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations use-cases.md (Serbian (Latin)) docs(website): new translations * New translations use-cases.md (Serbian (Latin)) docs(website): new translations * New translations use-cases.md (Serbian (Latin)) docs(website): new translations * New translations use-cases.md (Serbian (Latin)) docs(website): new translations * New translations use-cases.md (Serbian (Latin)) docs(website): new translations * New translations use-cases.md (Serbian (Latin)) docs(website): new translations * New translations web.md (Serbian (Latin)) docs(website): new translations * New translations web.md (Serbian (Latin)) docs(website): new translations * New translations what-is-verdaccio.md (Serbian (Latin)) docs(website): new translations * New translations what-is-verdaccio.md (Serbian (Latin)) docs(website): new translations * New translations windows.md (Serbian (Latin)) docs(website): new translations * New translations what-is-verdaccio.md (Serbian (Latin)) docs(website): new translations * New translations windows.md (Serbian (Latin)) docs(website): new translations * New translations windows.md (Serbian (Latin)) docs(website): new translations * New translations en.json (Serbian (Latin)) docs(website): new translations * New translations en.json (Serbian (Latin)) docs(website): new translations * New translations en.json (Serbian (Latin)) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations protect-your-dependencies.md (French) docs(website): new translations * New translations protect-your-dependencies.md (French) docs(website): new translations * New translations repositories.md (French) docs(website): new translations * New translations reverse-proxy.md (French) docs(website): new translations * New translations reverse-proxy.md (French) docs(website): new translations * New translations server.md (French) docs(website): new translations * New translations test.md (French) docs(website): new translations * New translations test.md (French) docs(website): new translations * New translations uplinks.md (French) docs(website): new translations * New translations uplinks.md (French) docs(website): new translations * New translations uplinks.md (French) docs(website): new translations * New translations uplinks.md (French) docs(website): new translations * New translations uplinks.md (French) docs(website): new translations * New translations use-cases.md (French) docs(website): new translations * New translations server.md (French) docs(website): new translations * New translations use-cases.md (French) docs(website): new translations * New translations auth.md (Serbian (Latin)) docs(website): new translations * New translations auth.md (Serbian (Latin)) docs(website): new translations * New translations contributing.md (Serbian (Latin)) docs(website): new translations * New translations contributing.md (Serbian (Latin)) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations server.md (French) docs(website): new translations * New translations packages.md (French) docs(website): new translations * New translations auth.md (Serbian (Latin)) docs(website): new translations * New translations cli.md (Serbian (Latin)) docs(website): new translations * New translations ci.md (Serbian (Latin)) docs(website): new translations * New translations chef.md (Serbian (Latin)) docs(website): new translations * New translations contributing.md (Serbian (Latin)) docs(website): new translations * New translations dev-plugins.md (Serbian (Latin)) docs(website): new translations * New translations docker.md (Serbian (Latin)) docs(website): new translations * New translations iis-server.md (Serbian (Latin)) docs(website): new translations * New translations install.md (Serbian (Latin)) docs(website): new translations * New translations notifications.md (Serbian (Latin)) docs(website): new translations * New translations packages.md (Serbian (Latin)) docs(website): new translations * New translations plugins.md (Serbian (Latin)) docs(website): new translations * New translations server.md (Serbian (Latin)) docs(website): new translations * New translations ssl.md (Serbian (Latin)) docs(website): new translations * New translations test.md (Serbian (Latin)) docs(website): new translations * New translations uplinks.md (Serbian (Latin)) docs(website): new translations * New translations uplinks.md (Serbian (Latin)) docs(website): new translations * New translations use-cases.md (Serbian (Latin)) docs(website): new translations * New translations windows.md (Serbian (Latin)) docs(website): new translations * New translations server.md (French) docs(website): new translations * New translations use-cases.md (French) docs(website): new translations * New translations uplinks.md (French) docs(website): new translations * New translations use-cases.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations plugins.md (French) docs(website): new translations * New translations test.md (French) docs(website): new translations * New translations uplinks.md (French) docs(website): new translations
88 lines
2.5 KiB
Markdown
88 lines
2.5 KiB
Markdown
---
|
|
id: reverse-proxy
|
|
title: "Configuration du proxy inverse"
|
|
---
|
|
## Apache
|
|
|
|
Apache et mod_proxy ne doivent pas décoder/encoder les barres obliques et doivent les laisser tels qu'elles sont:
|
|
|
|
<VirtualHost *:80>
|
|
AllowEncodedSlashes NoDecode
|
|
ProxyPass /npm http://127.0.0.1:4873 nocanon
|
|
ProxyPassReverse /npm http://127.0.0.1:4873
|
|
</VirtualHost>
|
|
|
|
|
|
### Configuration avec SSL
|
|
|
|
config.yaml
|
|
|
|
```yaml
|
|
url_prefix: https://npm.your.domain.com
|
|
```
|
|
|
|
Configuration du serveur virtuel Apache
|
|
|
|
apacheconfig
|
|
<IfModule mod_ssl.c>
|
|
<VirtualHost *:443>
|
|
ServerName npm.your.domain.com
|
|
SSLEngine on
|
|
SSLCertificateFile /etc/letsencrypt/live/npm.your.domain.com/fullchain.pem
|
|
SSLCertificateKeyFile /etc/letsencrypt/live/npm.your.domain.com/privkey.pem
|
|
SSLProxyEngine On
|
|
ProxyRequests Off
|
|
ProxyPreserveHost On
|
|
AllowEncodedSlashes NoDecode
|
|
ProxyPass / http://127.0.0.1:4873 nocanon
|
|
ProxyPassReverse / http://127.0.0.1:4873
|
|
</VirtualHost>
|
|
</IfModule>
|
|
|
|
|
|
## Nginx
|
|
|
|
server {
|
|
listen 80 default_server;
|
|
location / {
|
|
proxy_pass http://127.0.0.1:4873/;
|
|
proxy_set_header Host $host;
|
|
}
|
|
}
|
|
|
|
|
|
## Commencer derrière le proxy inverse avec un domaine et un port différents
|
|
|
|
Si vous exécutez verdaccio derrière le proxy inverse, vous remarqueriez que tous les fichiers de ressources fonctionnent comme des chemins associés, tels que `http://127.0.0.1:4873/-/static`
|
|
|
|
Pour résoudre le problème, vous devez envoyer le domaine réel et le port avec l'en-tête `Host` à verdaccio
|
|
|
|
La configuration de Nginx devrait ressembler à ceci:
|
|
|
|
```nginx
|
|
ocation / {
|
|
proxy_pass http://127.0.0.1:4873/;
|
|
proxy_set_header Host $host:$server_port;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
```
|
|
|
|
Dans ce cas, `url_prefix` ne doit pas être défini dans la configuration de verdaccio
|
|
|
|
* * *
|
|
|
|
ou dans l'installation d'un sous-dossier:
|
|
|
|
```nginx
|
|
location ~ ^/verdaccio/(.*)$ {
|
|
proxy_pass http://127.0.0.1:4873/$1;
|
|
proxy_set_header Host $host:$server_port;
|
|
proxy_set_header X-Forwarded-For $remote_addr;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
```
|
|
|
|
Dans ce cas, `url_prefix` doit être défini sur `/verdaccio/`
|
|
|
|
> Remarque: il y a une barre oblique après le chemin d'installation (`https://votre-domaine:port/verdaccio/`)! |