重写到维护页面 apache2

时间:2021-05-19 16:46:31

标签: proxy url-rewriting apache2

我在 apache2 上有这个配置

<VirtualHost *:443>
ServerName www.servername.it

SSLEngine on
SSLCertificateFile pathcertificate...
SSLCertificateKeyFile pathcertificate...
SSLCertificateChainFile pathcertificate...

DocumentRoot "/var/www/html"
ProxyPass /error !

ErrorDocument 503 /error/index.html

RewriteEngine On
RewriteCond /var/www/html/error/index.html -f
RewriteRule ^ - [L,R=503]

ProxyPass /otherpath http://localhost:8080/page.xhtml
ProxyPassReverse    /go2pa http://localhost:8080/page.xhtml

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

我配置了两个 proxypass,但我想制定一个一般规则,即当此文件 (error/index.html) 存在时,所有内容都将转发到 apache2 文件夹内的另一个文件。 基本上我想在 error/index.html 存在时显示一个维护页面。 我究竟做错了什么 ? 谢谢

0 个答案:

没有答案
相关问题