aboutsummaryrefslogtreecommitdiffstats
path: root/config/apache_mod_security
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-06-22 20:52:35 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-06-22 20:52:35 -0400
commit91a91ead3dd6da36e649611cc1a2c9fb532d7764 (patch)
tree90dc3844f556e8084220f7b01c63d976a81705af /config/apache_mod_security
parent0756c3e4b172ab06b143e3a84b657213f9a16904 (diff)
downloadpfsense-packages-91a91ead3dd6da36e649611cc1a2c9fb532d7764.tar.gz
pfsense-packages-91a91ead3dd6da36e649611cc1a2c9fb532d7764.tar.bz2
pfsense-packages-91a91ead3dd6da36e649611cc1a2c9fb532d7764.zip
Commit examples in comments.
Diffstat (limited to 'config/apache_mod_security')
-rw-r--r--config/apache_mod_security/apache_mod_security.inc34
-rw-r--r--config/apache_mod_security/apache_mod_security.xml20
2 files changed, 49 insertions, 5 deletions
diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc
index 7ee36c81..bea52211 100644
--- a/config/apache_mod_security/apache_mod_security.inc
+++ b/config/apache_mod_security/apache_mod_security.inc
@@ -35,14 +35,44 @@ ProxyRequests off
Allow from all
</Proxy>
+#----------------1 backend ip---------------------
+#<VirtualHost IP:port>
+# ServerAdmin $serveradmin
+# ServerName $primarysitehostname
+# ServerAlias $additionalsitehostnames
+# ProxyPass / $backendwebserverURL
+# ProxyPassReverse / $backendwebserverURL
+#</VirtualHost>
+#where serveralias will be a space-separated list of "additional site hostnames"
+#i.e. if you have www1.example.com and www2.example.com there, it's "ServerAlias www1.example.com www2.example.com"
+#-------------------------------------------------
+
+#------------mutliple backend ips-----------------
+# Add:
+#<Proxy balancer://$sitename>
+# BalancerMember $backend1
+# BalancerMember $backend2
+#</Proxy>
+# Change:
+# ProxyPass / balancer://$sitename/
+# ProxyPassReverse / balancer://$sitename/
+#-------------------------------------------------
+
EOF;
// Setup mod_proxy entries
if($config['installedpackages']['apachemodsecurity']) {
foreach($config['installedpackages']['apachemodsecurity']['config'] as $ams) {
$backend_sites = "";
- foreach($ams['row'] as $row)
- $backend_sites .= "{$row['webserveripaddr']} ";
+ if(count($ams['row']) == 1) {
+ // 1 backend example
+
+ } else {
+ // multiple backend examples
+ foreach($ams['row'] as $row)
+ $backend_sites .= "{$row['webserveripaddr']} ";
+ }
+
$sitename = str_replace(" ", "", $ams['sitename']);
$mod_proxy .= "\n";
if($backend_sites) {
diff --git a/config/apache_mod_security/apache_mod_security.xml b/config/apache_mod_security/apache_mod_security.xml
index 333bea2f..9f4f8b59 100644
--- a/config/apache_mod_security/apache_mod_security.xml
+++ b/config/apache_mod_security/apache_mod_security.xml
@@ -84,7 +84,17 @@
<fieldname>sitename</fieldname>
<description><![CDATA[Enter a short descriptive name for the site. (e.g. intranet)]]></description>
<type>input</type>
- </field>
+ </field>
+ <field>
+ <fielddescr>Site Webmaster E-Mail address</fielddescr>
+ <fieldname>siteemail</fieldname>
+ <description>
+ <![CDATA[
+ Enter the Webmaster E-Mail address for this site.
+ ]]>
+ </description>
+ <type>input</type>
+ </field>
<field>
<fielddescr>Protocol</fielddescr>
<fieldname>siteurl</fieldname>
@@ -113,7 +123,11 @@
<field>
<fielddescr>Primary site hostname</fielddescr>
<fieldname>primarysitehostname</fieldname>
- <description><![CDATA[Enter the primary hostname (FQDN) for this website (e.g. www.example.com)]]></description>
+ <description>
+ <![CDATA[
+ Enter the primary hostname (FQDN) for this website (e.g. www.example.com)<br/>
+ Leave blank and define the IP Address / port above for IP site proxy (i.e. not named site proxy)
+ ]]></description>
<size>40</size>
<type>input</type>
</field>
@@ -151,7 +165,7 @@
<type>rowhelper</type>
<rowhelper>
<rowhelperfield>
- <fielddescr>Web server backend IP</fielddescr>
+ <fielddescr>Web server backend URL</fielddescr>
<fieldname>webserveripaddr</fieldname>
<description>Add each web server IP address here.</description>
<type>input</type>