网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
08月10日漏签0天
nginx吧 关注:4,530贴子:6,536
  • 看贴

  • 图片

  • 吧主推荐

  • 游戏

  • 1回复贴,共1页
<<返回nginx吧
>0< 加载中...

各位大佬好,我的后端192.168.1.x上部署了一个esx

  • 只看楼主
  • 收藏

  • 回复
  • wangziyue0993
  • 无名之辈
    2
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
各位大佬好,
我的后端192.168.1.x上部署了一个esxi服务器,前端域名绑定的example.com服务器为nginx代理。如果配置文件为以下内容,则无法通过网址https://www.example.com:4443/esxi/访问esxi网页管理页面:
#配置文件1
server {
listen 4443;
server_name http://www.example.com;
#access_log /var/log/nginx/access.log;
#error_log /var/log/nginx/error.log;
ssl on;
ssl_certificate /etc/nginx/ssl/example.com/cert.pem;
ssl_certificate_key /etc/nginx/ssl/example.com/key.pem;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
root /var/www/html;
index 网页链接 网页链接 index.nginx-debian.html;
location / {
try_files $uri $uri/ =404;
}
location /esxi/ {
proxy_pass https://192.168.1.x/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
通过配置文件1,访问https://www.example.com:4443/esxi/访问后,会重定向至https://www.example.com:4443/ui然后出现无法访问的情况。手动输入https://www.example.com:4443/esxi/ui/#/login可以访问登陆界面,但输入用户名和密码后会提示please refresh your browser。无法登录
但是,通过以下方式就可以通过网址https://esxi.example.com:4443/正常登录及访问后台管理页面:
#配置文件2
server {
listen 4443;
server_name esxi.example.com;
ssl on;
ssl_certificate /etc/nginx/ssl/example.com/cert.pem;
ssl_certificate_key /etc/nginx/ssl/example.com/key.pem;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
proxy_pass https://192.168.1.x/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}


  • wangziyue0993
  • 无名之辈
    2
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
求助各位大佬!感恩!


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 1回复贴,共1页
<<返回nginx吧
分享到:
©2025 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示