我有一个apache want服务器,我希望将代理所有请求转发到另一个域。到目前为止,我已经对http请求这样做了,但是它不适用于https。我的httpd-ssl.conf文件:
Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/var/log/httpd/ssl_scache(512000)
SSLSessionCacheTimeout 300
SSLProxyEngine On
SSLProxyVerify require
SSLProtocol All -SSlv2 -SSLv3
ProxyRequests Off
ProxyPreserveHost On
<VirtualHost _default_:443>
ServerName domain.com
ServerAdmin webmaster@domain.com
DocumentRoot /path
ProxyRequests Off
ProxyPreserveHost On
SSLEngine On
SSLProxyEngine On
SSLHonorCipherOrder On
SSLCipherSuite --
SSLCertificateFile /path/server.crt
SSLCertificateKeyFile /path/server.key
SSLCACertificateFile /path/server.ca
#<Proxy *>
# Order allow,deny
# Allow from all
#</Proxy>
<Location / >
ProxyPass "http://my.ip/"
ProxyPassReverse "http://my.ip/"
</Location>
</VirtualHost>当我转到http://example.com/v1时,它将请求转发给http://my.ip/v1,但是当我使用https (https://example.com/v1)转到同一个url时,它只是打开根目录中的index.html,而不转发请求。
发布于 2018-10-22 14:48:30
并将其添加到VirtualHost配置中:
SSLProxyEngine on您还可以在普通的ProxyPass部分使用VirtualHost命令。
部分
<Location />
...
</Location>是不必要的。
https://serverfault.com/questions/936503
复制相似问题