aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/haproxy/haproxy.inc5
-rwxr-xr-xconfig/haproxy/haproxy_global.php10
2 files changed, 14 insertions, 1 deletions
diff --git a/config/haproxy/haproxy.inc b/config/haproxy/haproxy.inc
index 0890dbc7..769f007f 100644
--- a/config/haproxy/haproxy.inc
+++ b/config/haproxy/haproxy.inc
@@ -109,7 +109,10 @@ function haproxy_configure() {
if(is_array($a_global)) {
fwrite ($fd, "global\n");
fwrite ($fd, "\tmaxconn\t\t\t".$a_global['maxconn']."\n");
- fwrite ($fd, "\tlog\t\t\t127.0.0.1 local0\n");
+ if($a_global['remotesyslog'])
+ fwrite ($fd, "\tlog\t\t\t{$a_global['remotesyslog']}\n");
+ else
+ fwrite ($fd, "\tlog\t\t\tglobal\n");
fwrite ($fd, "\tuid\t\t\t80\n");
fwrite ($fd, "\tgid\t\t\t80\n");
$numprocs = trim(`/sbin/sysctl kern.smp.cpus | cut -d" " -f2`);
diff --git a/config/haproxy/haproxy_global.php b/config/haproxy/haproxy_global.php
index 20dc47a2..253cc397 100755
--- a/config/haproxy/haproxy_global.php
+++ b/config/haproxy/haproxy_global.php
@@ -75,6 +75,7 @@ if ($_POST) {
$config['installedpackages']['haproxy']['synchost1'] = $_POST['synchost1'] ? $_POST['synchost1'] : false;
$config['installedpackages']['haproxy']['synchost2'] = $_POST['synchost2'] ? $_POST['synchost2'] : false;
$config['installedpackages']['haproxy']['synchost2'] = $_POST['synchost3'] ? $_POST['synchost3'] : false;
+ $config['installedpackages']['haproxy']['remotesyslog'] = $_POST['remotesyslog'] ? $_POST['remotesyslog'] : false;
$config['installedpackages']['haproxy']['syncpassword'] = $_POST['syncpassword'] ? $_POST['syncpassword'] : false;
touch($d_haproxyconfdirty_path);
write_config();
@@ -90,6 +91,7 @@ $pconfig['syncpassword'] = $config['installedpackages']['haproxy']['syncpassword
$pconfig['synchost1'] = $config['installedpackages']['haproxy']['synchost1'];
$pconfig['synchost2'] = $config['installedpackages']['haproxy']['synchost2'];
$pconfig['synchost3'] = $config['installedpackages']['haproxy']['synchost3'];
+$pconfig['remotesyslog'] = $config['installedpackages']['haproxy']['remotesyslog'];
$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
if(strstr($pfSversion, "1.2"))
@@ -195,6 +197,14 @@ function enable_change(enable_change) {
</td>
</tr>
<tr>
+ <td valign="top" class="vncell">
+ Remote syslog host
+ </td>
+ <td class="vtable">
+ <input name="remotesyslog" type="text" class="formfld" id="remotesyslog" size="18" value="<?=htmlspecialchars($pconfig['remotesyslog']);?>">
+ </td>
+ </tr>
+ <tr>
<td>
&nbsp;
</td>