aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-06-21 20:47:29 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-06-21 20:47:29 -0400
commit8b59acc20071fd66cd99f4b1f667da2ee88440a9 (patch)
tree829eda6b4c7a9811ba7e5cdfa29b229fafd6eb30 /config
parentdcb40a61ff15f5afe1a60674a9d8e88675e8b801 (diff)
downloadpfsense-packages-8b59acc20071fd66cd99f4b1f667da2ee88440a9.tar.gz
pfsense-packages-8b59acc20071fd66cd99f4b1f667da2ee88440a9.tar.bz2
pfsense-packages-8b59acc20071fd66cd99f4b1f667da2ee88440a9.zip
Reduce configuration to common
Diffstat (limited to 'config')
-rw-r--r--config/apache_mod_security/apache_mod_security.inc31
1 files changed, 15 insertions, 16 deletions
diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc
index 7701d335..0ecd1d6b 100644
--- a/config/apache_mod_security/apache_mod_security.inc
+++ b/config/apache_mod_security/apache_mod_security.inc
@@ -26,26 +26,25 @@ function generate_apache_configuration() {
// Generate mod_proxy specific configuration
$mod_proxy = "ProxyRequests on\n";
+ $mod_proxy = <<<EOF
+<Proxy *>
+ Order deny,allow
+ Allow from all
+</Proxy>
+
+EOF;
+
if($config['installedpackages']['apachemodsecurity']) {
foreach($config['installedpackages']['apachemodsecurity']['config'] as $ams) {
- $sitename = str_replace(" ", "", $ams['sitename']);
- $mod_proxy .= "ProxyPass /{$sitename}/ ";
+ $backend_sites = "";
foreach($ams['row'] as $row)
- $mod_proxy .= " {$row['webserveripaddr']}";
- $mod_proxy .= "\n";
-
- $mod_proxy .= "<Location /{$sitename}/>\n";
- $mod_proxy .= " ProxyRemote {$ams['siteurl']}";
- foreach($ams['row'] as $row)
- $mod_proxy .= " {$row['webserveripaddr']}";
+ $backend_sites .= "{$row['webserveripaddr']} ";
+ $sitename = str_replace(" ", "", $ams['sitename']);
$mod_proxy .= "\n";
- $mod_proxy .= " ProxyPassReverse /\n";
- $mod_proxy .= " SetOutputFilter proxy-html\n";
-// $mod_proxy .= "ProxyHTMLURLMap {$ams['siteurl']} /{$sitename} \n";
-// $mod_proxy .= " ProxyHTMLURLMap / /{$sitename}/\n";
-// $mod_proxy .= " ProxyHTMLURLMap /{$ams['sitename']} /{$sitename}\n";
- $mod_proxy .= " RequestHeader unset Accept-Encoding\n";
- $mod_proxy .= "</Location>\n";
+ if($backend_sites) {
+ $mod_proxy .= "ProxyPass /{$sitename} {$backend_sites}\n";
+ $mod_proxy .= "ProxyPassReverse / {$backend_sites}\n";
+ }
}
}
// Set global site e-mail