![](/img/trans.png)
[英]Apache ProxyPass loading Resources only if I use "/" (not in another path)
[英]Apache ProxyPass not loading Resources
我配置了 apache proxypass,它可以工作,但不能加載圖像、javascript、CSS 等...我想將 proxypass 代理到另一台服務器,而不是本地主機。 下面是我的配置。
<VirtualHost *:80>
ServerName app.server.com
DocumentRoot /var/www/html/subdomain
RewriteEngine on
ProxyRequests Off
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPass /apm http://192.168.1.102:9999/
ProxyPassReverse /apm http://192.168.1.102:9999/
</virtualHost>
經過一些研究和閱讀一些教程后,我得到了一個解決方案。
<VirtualHost *:80>
ServerName app.server.com
DocumentRoot /var/www/html/subdomain
RewriteEngine on
ProxyRequests Off
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPass / http://192.168.1.102:9999/
ProxyPassReverse / http://192.168.1.102:9999/
</VirtualHost>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.