diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-06-20 22:05:58 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-06-20 22:05:58 -0400 |
commit | 9db6d513e86c455060461f532c01592d1e243e03 (patch) | |
tree | 7c3b43c3d9c4256fdd9b6f15a3312275a930cc2b /config/apache_mod_security | |
parent | d6c063160d3ac8b528a08a09cbe8a3f61b583547 (diff) | |
download | pfsense-packages-9db6d513e86c455060461f532c01592d1e243e03.tar.gz pfsense-packages-9db6d513e86c455060461f532c01592d1e243e03.tar.bz2 pfsense-packages-9db6d513e86c455060461f532c01592d1e243e03.zip |
Add coupon column. Minor form fixups
Diffstat (limited to 'config/apache_mod_security')
-rw-r--r-- | config/apache_mod_security/apache_mod_security.inc | 14 | ||||
-rw-r--r-- | config/apache_mod_security/apache_mod_security.xml | 13 |
2 files changed, 21 insertions, 6 deletions
diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc index b1b84040..786d1995 100644 --- a/config/apache_mod_security/apache_mod_security.inc +++ b/config/apache_mod_security/apache_mod_security.inc @@ -3,20 +3,24 @@ // Syntax:ProxyPreserveHost On|Off function apache_mod_security_install() { + global $config, $g; conf_mount_rw(); if(!is_dir("/usr/local/apachemodsecurity")) safe_mkdir("/usr/local/apachemodsecurity"); } function apache_mod_security_deinstall() { + global $config, $g; exec("rm -rf /usr/local/apachemodsecurity"); } function apache_mod_security_resync() { + global $config, $g; generate_apache_configuration(); } function generate_apache_configuration() { + global $config, $g; // Generate mod_proxy specific configuration $mod_proxy = "ProxyRequests on\n"; @@ -26,10 +30,14 @@ function generate_apache_configuration() { $mod_proxy .= "ProxyPass /{$sitename}/ {$sitename} \n"; $mod_proxy .= "ProxyHTMLURLMap {$ams['siteurl']} /{$sitename} \n"; $mod_proxy .= "<Location /{$sitename}/>\n"; + $mod_proxy .= " ProxyRemote {$ams['siteurl']}"; + foreach($ams['row'] as $row) + $mod_proxy .= " {$row['webserveripaddr']}"; + $mod_proxy .= "\n"; $mod_proxy .= " ProxyPassReverse /\n"; $mod_proxy .= " SetOutputFilter proxy-html\n"; - $mod_proxy .= " ProxyHTMLURLMap / /{$sitename}/\n"; - $mod_proxy .= " ProxyHTMLURLMap /{$ams['sitename']} /{$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"; } @@ -558,8 +566,10 @@ SSLRandomSeed connect builtin SecFilterDefaultAction "deny,log,status:500" </IfModule> +# Mod_security and proxy settings {$mod_proxy} +# Include anything else Include etc/apache22/Includes/*.conf EOF; diff --git a/config/apache_mod_security/apache_mod_security.xml b/config/apache_mod_security/apache_mod_security.xml index 91e1b543..f8d5fe2e 100644 --- a/config/apache_mod_security/apache_mod_security.xml +++ b/config/apache_mod_security/apache_mod_security.xml @@ -73,6 +73,10 @@ <fielddescr>Site name</fielddescr> <fieldname>sitename</fieldname> </columnitem> + <columnitem> + <fielddescr>Site URL</fielddescr> + <fieldname>siteurl</fieldname> + </columnitem> </adddeleteeditpagefields> <fields> <field> @@ -85,20 +89,21 @@ <fielddescr>Site URL (FQDN)</fielddescr> <fieldname>siteurl</fieldname> <description></description> + <size>40</size> <type>input</type> </field> <field> - <fielddescr>Wenbservers</fielddescr> + <fielddescr>Webservers</fielddescr> <fieldname>webservers</fieldname> <type>rowhelper</type> <description></description> <rowhelper> <rowhelperfield> - <fielddescr>Webserver IP address</fielddescr> + <fielddescr>Webserver backend URL</fielddescr> <fieldname>webserveripaddr</fieldname> - <description>Add each webserver IP address here.</description> + <description>Add each webserver URL address here.</description> <type>input</type> - <size>16</size> + <size>50</size> </rowhelperfield> </rowhelper> </field> |