所以在跳板机搞了一个 nginx 来做正向代理处理内网服务器的请求来实现代码更新包更新之类的操作,但是不知道是不是配置的问题一直请求一直 405 ,还有更新 mavne 依赖的时候也会 timeou
t 前端 node 依赖也是安装不了的
,http 是可以正常拉取代码的但是 https 就不行,求大佬帮忙看看
下面是 nginx 配置(添加了 ngx_http_proxy_connect 模块)
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
resolver 114.114.114.114;
listen 880 default_server;
location / {
proxy_pass http://$host$request_uri;
proxy_set_header HOST $host;
proxy_buffers 256 4k;
proxy_max_temp_file_size 0k;
proxy_connect_timeout 30;
proxy_send_timeout 60;
proxy_read_timeout 60;
proxy_next_upstream error timeout invalid_header http_502;
}
}
server {
listen 443;
# dns resolver used by forward proxying
resolver 8.8.8.8;
# forward proxy for CONNECT request
proxy_connect;
proxy_connect_allow 443;
proxy_connect_connect_timeout 10s;
proxy_connect_read_timeout 10s;
proxy_connect_send_timeout 10s;
# forward proxy for non-CONNECT request
location / {
proxy_set_header Host $host;
proxy_pass $scheme://$host$request_uri;
}
}
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}