我有一个Apache2配置,它将所有URL重写为localhost:8080 . 我需要一个url用于未重写的图像,而是提供var / www / html中的文件(即https://.../images - > var / www / html) .

我知道在nginx中如何做到这一点,但apache2似乎让我感到困惑 . 到目前为止所有的努力都没有帮助,官方的mod-rewrite-docs也没有帮助......这是当前的配置 . 我想在正确的位置只有两行...

谢谢你的帮助...


. . .

服务器名称 - - . - - . - -

RewriteEngine On

RewriteCond%{HTTP:Upgrade} = websocket [NC] RewriteRule /(.*)ws:// localhost:8080 / $ 1 [P,L]

RewriteCond%{HTTP:Upgrade}!= websocket [NC] RewriteRule /(.*)http://localhost:8080/ $ 1 [P,L]

RequestHeader设置X-Forwarded-Proto“https”RequestHeader设置X-Forwarded-Port“443”

ProxyPreserveHost上

ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/

. . .