小编Vin*_*ini的帖子

ProxyHTMLURLMap 在 apache2.4 中不起作用

我在 ubuntu 14.04 上使用 apache2.4。我启用了 mod_proxy_html。但是我的 URL 没有被新的 URL 取代。我在 apache2.2 中做了同样的事情,它运行良好。这是我的虚拟主机文件。

<VirtualHost *:80>
ServerAdmin webmaster@example.com
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/html/www.example.com
LogLevel error
CustomLog /var/log/apache2/www.example.com_access.log combined
ErrorLog /var/log/apache2/www.example.com_error.log

#Proxy and cookies settings
ProxyPreserveHost On
ProxyPassReverse / http://www.example.com/example/control/
ProxyPassReverse / https://www.example.com/example/control/
ProxyPassReverse / /example/control/
ProxyPassReverseCookiePath /example /

    <Proxy balancer://cluster>
        BalancerMember ajp://10.14.78.45:8009 route=node01 keepalive=On loadfactor=1 ping=10 ttl=600
        ProxySet timeout=60 stickysession=JSESSIONID nofailover=On
    </Proxy>

RewriteEngine On

#redirect non www domain to www domain
RewriteCond %{HTTP_HOST} ^example.com$ [NC]
    RewriteRule ^(.*)$ http://www.example.com$1 [R=301,L]

#Website    
RewriteRule …
Run Code Online (Sandbox Code Playgroud)

mod-rewrite reverse-proxy apache-2.2 apache-2.4

4
推荐指数
1
解决办法
1万
查看次数