这是configuration:
<Directory /> Deny from all Allow from localhost Order Deny,Allow AuthType Basic Require valid-user AllowOverride None Satisfy any Options None FollowSymLinks </Directory> <Proxy *> Deny from all Order Deny,Allow AuthType Basic Require valid-user Satisfy any Options None FollowSymLinks </Proxy>
问题:
1)为什么configurationProxy *如果已经configurationDirectory / ?
2)应该configurationProxy *或Proxy /
3)是否所有属性(例如Deny from all或Allow from localhost )被configuration两次( Proxy和Directory )或只在一个地方? 如果在一个地方应该configuration: Proxy或Directory ?
4)什么configuration优先考虑Proxy或Directory ?
在configuration文件中添加目录/代理的顺序很重要? 例如,如果我有具体的/app相关的部分应该是之前或之后的根节?
<Directory /app> AuthType None </Directory> <Proxy http://localhost:8080/app > AuthType None </Proxy>
基本解释:
HTTP GET xxx ... Host: yyy看到它HTTP GET xxx ... Host: yyy在每个对话的开始处, HTTP GET xxx ... Host: yyy 。 现在你的问题的实际答案是:
<Proxy>匹配后端URI。 <Directory>匹配一个真正的本地文件系统目录,你可以从shell中cd 。 <Directory>的请求很可能永远不会匹配<Proxy> 。 其余的你写的东西要么要么像查看文档一样,要么作为一个单独的问题在本网站上提出。