ups, wrong brakets :P
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -141,30 +141,26 @@ class nginx
|
|||||||
}
|
}
|
||||||
public function createFileDirOptions(){
|
public function createFileDirOptions(){
|
||||||
}
|
}
|
||||||
|
|
||||||
public function createIpPort()
|
public function createIpPort()
|
||||||
{
|
{
|
||||||
$query = "SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip` ASC, `port` ASC";
|
$query = "SELECT * FROM `" . TABLE_PANEL_IPSANDPORTS . "` ORDER BY `ip` ASC, `port` ASC";
|
||||||
$result_ipsandports = $this->db->query($query);
|
$result_ipsandports = $this->db->query($query);
|
||||||
|
|
||||||
while($row_ipsandports = $this->db->fetch_array($result_ipsandports))
|
while ($row_ipsandports = $this->db->fetch_array($result_ipsandports)) {
|
||||||
{
|
|
||||||
if(filter_var($row_ipsandports['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))
|
if (filter_var($row_ipsandports['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
|
||||||
{
|
|
||||||
$ip = '[' . $row_ipsandports['ip'] . ']';
|
$ip = '[' . $row_ipsandports['ip'] . ']';
|
||||||
$port = $row_ipsandports['port'];
|
} else {
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$ip = $row_ipsandports['ip'];
|
$ip = $row_ipsandports['ip'];
|
||||||
$port = $row_ipsandports['port'];
|
|
||||||
}
|
}
|
||||||
|
$port = $row_ipsandports['port'];
|
||||||
|
|
||||||
fwrite($this->debugHandler, ' nginx::createIpPort: creating ip/port settings for ' . $ip . ":" . $port . "\n");
|
fwrite($this->debugHandler, ' nginx::createIpPort: creating ip/port settings for ' . $ip . ":" . $port . "\n");
|
||||||
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ip . ":" . $port);
|
$this->logger->logAction(CRON_ACTION, LOG_INFO, 'creating ip/port settings for ' . $ip . ":" . $port);
|
||||||
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_froxlor_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf');
|
$vhost_filename = makeCorrectFile($this->settings['system']['apacheconf_vhost'] . '/10_froxlor_ipandport_' . trim(str_replace(':', '.', $row_ipsandports['ip']), '.') . '.' . $row_ipsandports['port'] . '.conf');
|
||||||
|
|
||||||
if(!isset($this->nginx_data[$vhost_filename]))
|
if (!isset($this->nginx_data[$vhost_filename])) {
|
||||||
{
|
|
||||||
$this->nginx_data[$vhost_filename] = '';
|
$this->nginx_data[$vhost_filename] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -206,7 +202,6 @@ class nginx
|
|||||||
if ($row_ipsandports['specialsettings'] != '') {
|
if ($row_ipsandports['specialsettings'] != '') {
|
||||||
$this->nginx_data[$vhost_filename].= $row_ipsandports['specialsettings'] . "\n";
|
$this->nginx_data[$vhost_filename].= $row_ipsandports['specialsettings'] . "\n";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SSL config options
|
* SSL config options
|
||||||
@@ -261,13 +256,11 @@ class nginx
|
|||||||
|
|
||||||
$php = new phpinterface($this->getDB(), $this->settings, $domain);
|
$php = new phpinterface($this->getDB(), $this->settings, $domain);
|
||||||
$this->nginx_data[$vhost_filename].= "\t\t".'fastcgi_pass unix:' . $php->getInterface()->getSocketFile() . ';' . "\n";
|
$this->nginx_data[$vhost_filename].= "\t\t".'fastcgi_pass unix:' . $php->getInterface()->getSocketFile() . ';' . "\n";
|
||||||
}
|
|
||||||
else
|
} else {
|
||||||
{
|
|
||||||
$this->nginx_data[$vhost_filename].= "\t\t".'fastcgi_pass ' . $this->settings['system']['nginx_php_backend'] . ';' . "\n";
|
$this->nginx_data[$vhost_filename].= "\t\t".'fastcgi_pass ' . $this->settings['system']['nginx_php_backend'] . ';' . "\n";
|
||||||
}
|
}
|
||||||
$this->nginx_data[$vhost_filename].= "\t".'}'."\n";
|
$this->nginx_data[$vhost_filename].= "\t".'}'."\n";
|
||||||
|
|
||||||
$this->nginx_data[$vhost_filename].= '}' . "\n\n";
|
$this->nginx_data[$vhost_filename].= '}' . "\n\n";
|
||||||
// End of Froxlor server{}-part
|
// End of Froxlor server{}-part
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user