我已經在 apache 中配置了 https-vhosts.conf 檔案指向非標準埠
ProxyRequests Off
ProxyPreserveHost On
Listen 8081
<VirtualHost *:8081>
RequestHeader set X-Forwarded-Proto "https" ####this is needed for our app
ServerName test.apa.com
ProxyPass / http://10.1.1.5:8443
ProxyPassReverse / http://10.1.1.5:8443
SSLEngine on
SSLCertificateFile /etc/ssl/certs/server.crt
SSLCertificateKeyFile /etc/ssl/private/server.key
</VirtualHost>
但是,當我嘗試在 chrome 中訪問 url: 
此外,地址欄中的 url 顯示為http://test.apa.com:8081。但是,當我將 http 更改為 https 并嘗試訪問時...它作業正常并且瀏覽器顯示https://test.apa。 com:8081。
請就虛擬主機的配置問題提出建議?
uj5u.com熱心網友回復:
Listen 8081
由于您使用的是 HTTPS 的非標準埠,因此您需要在Listen指令中指定它,否則默認為http. (https這只是使用標準 443 埠時的默認設定。)
例如:
Listen 8081 https
參考:
- https://httpd.apache.org/docs/2.4/mod/mpm_common.html#listen
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/370208.html
上一篇:JavaFX和Lucene
