为了账号安全,请及时绑定邮箱和手机立即绑定

nginx监听443端口 后面是apache监听8443, apache 返回301, nginx 如何正确处理?

nginx监听443端口 后面是apache监听8443, apache 返回301, nginx 如何正确处理?

慕标5832272 2019-05-13 13:25:06
nginx监听443,apache监听8443。nginx配置server{listen443;#server_name*.ht920.comht920.com;server_namewww.ht920.com;sslon;ssl_certificatecert/1523974750873.pem;ssl_certificate_keycert/1523974750873.key;ssl_session_timeout5m;ssl_ciphersECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;ssl_protocolsTLSv1TLSv1.1TLSv1.2;ssl_prefer_server_cipherson;location/{indexindex.htmlindex.htmindex.php;proxy_redirectoff;proxy_set_headerHost$host;proxy_set_headerX-Real-IP$remote_addr;proxy_set_headerX-Forwarded-For$proxy_add_x_forwarded_for;proxy_passhttps://localhost:8443;}access_loglogs/ht920.com_access.log;}现象是:我访问https://www.ht920.com/e/admin/正常访问,访问https://www.ht920.com/e/admin不行,会跳转到https://www.ht920.com:8443/e/admin/我在服务器访问了curl-khttps://localhost:8443/e/admin得到结果是:301MovedPermanentlyMovedPermanentlyThedocumenthasmovedhere.问题是,我要如何配置,才能正确301跳转?
查看完整描述

2 回答

  • 2 回答
  • 0 关注
  • 327 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信