我遇到了一个无法解决的问题。 我写了这样的apache配置:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin aa@aa.com
ServerName xx.xx.xx.com
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/ssl/localcerts/apache.pem
SSLCertificateKeyFile /etc/ssl/localcerts/apache.key
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyEngine on
ProxyPass /bdn/ https://test.yy.it/
ProxyPassReverse /bdn/ https://test.yy.it/
RequestHeader unset Accept-Encoding
Substitute "s|https://test.yy.it/|https://xx.xx.xx.com/bdn/|n"
FilterDeclare NEWPATHS
FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/html|"
FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/css|"
FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^text/javascript|"
FilterProvider NEWPATHS SUBSTITUTE "%{Content_Type} =~ m|^application/javascript|"
FilterChain NEWPATHS
</VirtualHost>
</IfModule>
反向代理有效,但我放松了CSS,javascript,图片,...... 为什么??? 我在网上看到了一些解决方案:
http://makandracards.com/makandra/32973-reverse-proxying-web-applications-with-apache-2-4+
https://serverfault.com/questions/561892/how-to-handle-relative-urls-correctly-with-a-reverse-proxy
但他们都没有工作。 我正在使用:
请帮帮我! 非常感谢。