Apache ProxyPass未加载资源

pcrecxhr  于 2022-11-16  发布在  Apache
关注(0)|答案(1)|浏览(210)

我配置了apache的proxypass,它的工作,但不加载图像,javascript,CSS等...我想proxypass到另一个服务器,而不是本地主机。下面是我的配置。
see error image

<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>
o7jaxewo

o7jaxewo1#

经过一些研究和阅读一些教程,我得到了一个解决方案。

<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>

相关问题