我已经安装了docker,并且具有一个正在运行的具有以下端口映射的容器。
0.0.0.0:32770-> 1414 / tcp,0.0.0.0:32769-> 4414 / tcp,0.0.0.0:32768-> 7800 / tcp
我可以在本地浏览器中使用http://localhost:32769打开页面。但是我无法使用http://server_name:32769在互联网上打开。
我在同一台计算机上安装了Jenkins,并且可以使用http://server_name:80通过Internet通过Nginx对其进行访问。在本地及其下方安装的Nginx是nginx.conf中的设置。
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_max_temp_file_size 0;
#this is the maximum upload size
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_request_buffering off; # Required for HTTP CLI commands in Jenkins > 2.54
proxy_set_header Connection ""; # Clear for keepalive
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
}