当前位置:网站首页>NPM private server problem of peanut shell intranet penetration mapping
NPM private server problem of peanut shell intranet penetration mapping
2022-06-26 05:57:00 【omage】
The author once wrote a blog about how to build NPM Private clothes
How to use docker build npm Private clothes _omage The blog of -CSDN Blog Kung Fu in the world , Fast break not only !npm The default official server for downloading packages is npmjs:https://registry.npmjs.org/ Due to abroad and well-known reasons ,npm install Life is slow to doubt ... Fortunately, Alibaba provided the domestic Taobao image source taobao:https://registry.npm.taobao.org/ ( Ma Shoufu has made a lot of contributions ) We just need to click the local command to switch npm Package source settings npm Source npm config set registry https://registry.npm...https://blog.csdn.net/omage/article/details/117289205?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522165465298516782390549972%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=165465298516782390549972&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~rank_v31_ecpm-1-117289205-null-null.nonecase&utm_term=verdaccio&spm=1018.2226.3001.4450 There is no problem accessing the intranet of the company , Later, due to the work needs of colleagues , It is necessary to solve the problem of accessing from the Internet NPM Private clothes , Use the peanut shell inner net penetration to map , After a simple configuration , Found a problem , namely verdaccio When mapping to the Internet , Some of the contents of the web pages are still referred to the intranet IP Address .
I looked for it verdaccio The solution of the official website , Adopted nginx Reverse proxy of , According to its configuration, the test failed
Reverse Proxy Setup | VerdaccioUsing a reverse proxy is a common practice. The following configurations are thehttps://verdaccio.org/docs/reverse-proxy/ Later, I thought about it myself , Changed configuration , Can run through , Now share the configuration .
server {
listen 14873;
location / {
proxy_set_header Accept-Encoding '';
proxy_pass http://192.1.1.10:4873/;
sub_filter 'http://192.1.1.10:4873' '$scheme://$http_host';
sub_filter_once off;
sub_filter_types *;
}
}Be careful :proxy_set_header Accept-Encoding ''; This is to prevent verdaccio Turn on gzip,sub_filter Cannot replace compressed web page content
边栏推荐
- "= =" difference from "equals"
- [PHP] PHP two-dimensional array is sorted by multiple fields
- A new explanation of tcp/ip five layer protocol model
- ES6的搭配环境
- Operator priority, associativity, and whether to control the evaluation order [detailed explanation]
- kolla-ansible部署openstack yoga版本
- Upgrading technology to art
- Household accounting procedures (First Edition)
- Household accounting procedures (the second edition includes a cycle)
- numpy.log
猜你喜欢

Gram 矩阵
Explore small program audio and video calls and interactive live broadcast from New Oriental live broadcast

Spark source code analysis (I): RDD collection data - partition data allocation

Consul服务注册与发现

操作符的优先级、结合性、是否控制求值顺序【详解】

怎么把平板作为电脑的第二扩展屏幕

String类学习

Getting started with Python

Bingc (inheritance)

Ribbon load balancing service call
随机推荐
怎么把平板作为电脑的第二扩展屏幕
小程序第三方微信授权登录的实现
bingc(继承)
适配器模式
家庭记账程序(第二版 加入了循环)
Lesson 4 serial port and clock
劣币驱逐良币的思考
售前分析
Level signal and differential signal
通俗易懂的从IDE说起,再谈谈小程序IDE
Redis underlying data structure
numpy.random.choice
循环位移
The most refined language interprets the event dispatcher (also known as the event scheduler)
Class and object learning
There are applications related to web network request API in MATLAB (under update)
Redis多线程与ACL
pytorch(环境、tensorboard、transforms、torchvision、dataloader)
How to use the tablet as the second extended screen of the PC
Pre-Sale Analysis