【发布时间】:2016-02-04 17:11:08
【问题描述】:
我有一个我无法解决的问题。 我这样写我的 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
但它们都没有工作。 我正在使用:
- S.O. Debian 8
- Apache v. 2.4.10
请帮帮我! 非常感谢。
【问题讨论】: