我已經在apache2中使用反向代理+ Mod安全設置了虛擬主機配置。 但它重疊,它不會在重新啓動apache2時給出任何錯誤,但第二個 虛擬主機配置與第一個虛擬主機配置重疊。使用ReverseProxy + ModSecurity的Apache中的VirtualHost配置
第一個工作正常。
我的虛擬主機配置情況如下:
NameVirtualHost 192.168.1.101:80
<VirtualHost 192.168.1.101:80>
ServerName 124.125.252.31
DocumentRoot /var/www
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPass /asd http://124.125.252.31/
ProxyPassReverse /asd http://124.125.252.31/
<Location /asd>
Order deny,allow
Allow from all
</Location>
Include /etc/apache2/rules/modsecurity_crs_10_config.conf
Include /etc/apache2/rules/base_rules/*.conf
</VirtualHost>
<VirtualHost 192.168.1.101:80>
ServerName 124.125.252.32
DocumentRoot /var/www
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyRequests Off
ProxyPass /qwe http://124.125.252.32/
ProxyPassReverse /qwe http://124.125.252.32/
<Location /qwe>
Order deny,allow
Allow from all
</Location>
Include /etc/apache2/rules/modsecurity_crs_10_config.conf
Include /etc/apache2/rules/base_rules/*.conf
</VirtualHost>