Apache virtualhost-仅在文件/文件夹不存在时重写代理密码

问题描述

我有一个Java 'mother'应用程序( proxypass ),该应用程序基于{{1} }。

我使用域名将对该域根目录的调用重定向到相应的'child'应用。

我正在使用“让我们加密证书”以允许使用https,因此我有一个批处理文件来更新证书。

该批处理将质询文件保存在L.E需要访问的适当文件夹中。验证过程。

我正试图让L.E.访问这些文件。如果(仅)网址直接指向它们。在任何其他情况下,我都希望根据域重定向到正确的'child'应用。

我当前用于域/系统的虚拟主机条目如下:

.../open.do?action=open&sys=TST

但是,即使我尝试访问<VirtualHost test.io:80> ServerAdmin webmaster@test.ig ServerName test.io ServerAlias test.io # Force SSL Redirect permanent / https://test.io/ ErrorLog "logs/test.io-error.log" CustomLog "logs/test.io-access.log" common LogLevel alert rewrite:trace6 </VirtualHost> <VirtualHost test.io:443> SSLEngine on SSLCertificateFile c:\le64\test.io\test.io.crt SSLCertificateKeyFile c:\le64\test.io\test.io.key ServerAdmin webmaster@test.io ServerName test.io ServerAlias test.io # Rewrite to make L.E. challenge files visible RewriteEngine On RewriteCond %{DOCUMENT_ROOT}/.well-known/acme-challenge/$1 -f [OR] RewriteCond %{DOCUMENT_ROOT}/.well-known/acme-challenge/$1 -d RewriteRule (.*) - [L] # Else Rewrite to open the right SYS (Need sys=XXX Value) RewriteCond "%{REQUEST_URI}" "!^/webrunstudio/.*$" RewriteRule "^/?(.*)" "/webrunstudio/open.do?action=open&sys=TST" [L,R,NE] # ProxyPass / http://127.0.0.1:8080/ ProxyPassReverse / http://127.0.0.1:8080/ ErrorLog "logs/test.io-error.log" CustomLog "logs/test.io-access.log" common </VirtualHost> 上的现有文件,我的第二条规则也会覆盖第一条规则。

这可以防止L.E.验证文件的存在,因此我需要手动/临时更改虚拟主机条目,重新启动apache等...

谢谢您的评论。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...