Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56276a19d1 | ||
|
|
c00abc3b92 | ||
|
|
301dadaa02 | ||
|
|
54200427ab | ||
|
|
f8996ad767 | ||
|
|
9838ff4da5 | ||
|
|
192e00c717 | ||
|
|
43ca4a28e4 | ||
|
|
16e9fd6bd9 | ||
|
|
16f547bce0 | ||
|
|
60a482dce6 | ||
|
|
9540cb158c | ||
|
|
1984aced9d | ||
|
|
ca2949da71 | ||
|
|
eb8449fd79 | ||
|
|
d245bca445 | ||
|
|
5f899a5510 |
@@ -49,7 +49,36 @@ return array(
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'visible' => Settings::Get('system.leenabled')
|
||||
'visible' => Settings::Get('system.use_ssl')
|
||||
),
|
||||
'system_hsts_maxage' => array(
|
||||
'label' => $lng['admin']['domain_hsts_maxage'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'hsts_maxage',
|
||||
'type' => 'int',
|
||||
'int_min' => 0,
|
||||
'int_max' => 94608000, // 3-years
|
||||
'default' => 0,
|
||||
'save_method' => 'storeSettingField',
|
||||
'visible' => Settings::Get('system.use_ssl')
|
||||
),
|
||||
'system_hsts_incsub' => array(
|
||||
'label' => $lng['admin']['domain_hsts_incsub'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'hsts_incsub',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'visible' => Settings::Get('system.use_ssl')
|
||||
),
|
||||
'system_hsts_preload' => array(
|
||||
'label' => $lng['admin']['domain_hsts_preload'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'hsts_preload',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'visible' => Settings::Get('system.use_ssl')
|
||||
),
|
||||
/**
|
||||
* FCGID
|
||||
|
||||
@@ -179,6 +179,17 @@ return array(
|
||||
'nginx'
|
||||
)
|
||||
),
|
||||
'system_nginx_http2_support' => array(
|
||||
'label' => $lng['serversettings']['nginx_http2_support'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'nginx_http2_support',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField',
|
||||
'websrv_avail' => array(
|
||||
'nginx'
|
||||
)
|
||||
),
|
||||
'system_nginx_php_backend' => array(
|
||||
'label' => $lng['serversettings']['nginx_php_backend'],
|
||||
'settinggroup' => 'system',
|
||||
|
||||
@@ -153,33 +153,7 @@ return array(
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_hsts_maxage' => array(
|
||||
'label' => $lng['admin']['domain_hsts_maxage'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'hsts_maxage',
|
||||
'type' => 'int',
|
||||
'int_min' => 0,
|
||||
'int_max' => 94608000, // 3-years
|
||||
'default' => 0,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_hsts_incsub' => array(
|
||||
'label' => $lng['admin']['domain_hsts_incsub'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'hsts_incsub',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
'system_hsts_preload' => array(
|
||||
'label' => $lng['admin']['domain_hsts_preload'],
|
||||
'settinggroup' => 'system',
|
||||
'varname' => 'hsts_preload',
|
||||
'type' => 'bool',
|
||||
'default' => false,
|
||||
'save_method' => 'storeSettingField'
|
||||
),
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -210,6 +210,8 @@ if ($page == 'domains' || $page == 'overview') {
|
||||
'id' => $id
|
||||
));
|
||||
|
||||
$deleted_domains = $del_stmt->rowCount();
|
||||
|
||||
$upd_stmt = Database::prepare("
|
||||
UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET
|
||||
`subdomains_used` = `subdomains_used` - :domaincount
|
||||
|
||||
@@ -496,6 +496,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('system', 'ssl_cert_chainfile', ''),
|
||||
('system', 'ssl_cipher_list', 'ECDH+AESGCM:ECDH+AES256:!aNULL:!MD5:!DSS:!DH:!AES128'),
|
||||
('system', 'nginx_php_backend', '127.0.0.1:8888'),
|
||||
('system', 'nginx_http2_support', '0'),
|
||||
('system', 'perl_server', 'unix:/var/run/nginx/cgiwrap-dispatch.sock'),
|
||||
('system', 'phpreload_command', ''),
|
||||
('system', 'apache24', '0'),
|
||||
@@ -576,8 +577,8 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('panel', 'password_special_char_required', '0'),
|
||||
('panel', 'password_special_char', '!?<>§$%+#=@'),
|
||||
('panel', 'customer_hide_options', ''),
|
||||
('panel', 'version', '0.9.38'),
|
||||
('panel', 'db_version', '201610070');
|
||||
('panel', 'version', '0.9.38.4'),
|
||||
('panel', 'db_version', '201611180');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
|
||||
@@ -3516,6 +3516,39 @@ if (isFroxlorVersion('0.9.38-rc1')) {
|
||||
|
||||
if (isFroxlorVersion('0.9.38-rc2')) {
|
||||
|
||||
showUpdateStep("Updating from 0.9.38-rc2 to 0.9.38 final", false);
|
||||
updateToVersion('0.9.38');
|
||||
showUpdateStep("Updating from 0.9.38-rc2 to 0.9.38 final", false);
|
||||
updateToVersion('0.9.38');
|
||||
}
|
||||
|
||||
if (isDatabaseVersion('201610070')) {
|
||||
|
||||
showUpdateStep("Add Nginx http2 setting");
|
||||
Settings::AddNew("system.nginx_http2_support", 0);
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToDbVersion('201611180');
|
||||
}
|
||||
|
||||
if (isFroxlorVersion('0.9.38')) {
|
||||
|
||||
showUpdateStep("Updating from 0.9.38 to 0.9.38.1", false);
|
||||
updateToVersion('0.9.38.1');
|
||||
}
|
||||
|
||||
if (isFroxlorVersion('0.9.38.1')) {
|
||||
|
||||
showUpdateStep("Updating from 0.9.38.1 to 0.9.38.2", false);
|
||||
updateToVersion('0.9.38.2');
|
||||
}
|
||||
|
||||
if (isFroxlorVersion('0.9.38.2')) {
|
||||
|
||||
showUpdateStep("Updating from 0.9.38.2 to 0.9.38.3", false);
|
||||
updateToVersion('0.9.38.3');
|
||||
}
|
||||
|
||||
if (isFroxlorVersion('0.9.38.3')) {
|
||||
|
||||
showUpdateStep("Updating from 0.9.38.3 to 0.9.38.4", false);
|
||||
updateToVersion('0.9.38.4');
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ return array(
|
||||
'int_max' => 94608000, // 3-years
|
||||
'value' => 0
|
||||
),
|
||||
'hsts_incsub' => array(
|
||||
'hsts_sub' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||
|
||||
@@ -198,7 +198,7 @@ return array(
|
||||
'int_max' => 94608000, // 3-years
|
||||
'value' => $result['hsts']
|
||||
),
|
||||
'hsts_incsub' => array(
|
||||
'hsts_sub' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||
|
||||
@@ -107,7 +107,7 @@ return array(
|
||||
'int_max' => 94608000, // 3-years
|
||||
'value' => 0
|
||||
),
|
||||
'hsts_incsub' => array(
|
||||
'hsts_sub' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||
|
||||
@@ -118,7 +118,7 @@ return array(
|
||||
'int_max' => 94608000, // 3-years
|
||||
'value' => $result['hsts']
|
||||
),
|
||||
'hsts_incsub' => array(
|
||||
'hsts_sub' => array(
|
||||
'visible' => ($ssl_ipsandports != '' ? true : false),
|
||||
'label' => $lng['admin']['domain_hsts_incsub']['title'],
|
||||
'desc' => $lng['admin']['domain_hsts_incsub']['description'],
|
||||
|
||||
@@ -26,7 +26,11 @@
|
||||
*/
|
||||
function makeCorrectDir($dir) {
|
||||
|
||||
assert('is_string($dir) && strlen($dir) > 0', 'Value "' . $dir .'" does not look like an actual folder name');
|
||||
if (version_compare("5.4.6", PHP_VERSION, ">")) {
|
||||
assert('is_string($dir) && strlen($dir) > 0 /* $dir does not look like an actual folder name */');
|
||||
} else {
|
||||
assert('is_string($dir) && strlen($dir) > 0', 'Value "' . $dir .'" does not look like an actual folder name');
|
||||
}
|
||||
|
||||
$dir = trim($dir);
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
/**
|
||||
* return an array of all enabled redirect-codes
|
||||
*
|
||||
*
|
||||
* @return array array of enabled redirect-codes
|
||||
*/
|
||||
function getRedirectCodesArray() {
|
||||
|
||||
|
||||
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
|
||||
$result_stmt = Database::query($sql);
|
||||
|
||||
@@ -35,13 +35,13 @@ function getRedirectCodesArray() {
|
||||
/**
|
||||
* return an array of all enabled redirect-codes
|
||||
* for the settings form
|
||||
*
|
||||
*
|
||||
* @return array array of enabled redirect-codes
|
||||
*/
|
||||
function getRedirectCodes() {
|
||||
|
||||
global $lng;
|
||||
|
||||
|
||||
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
|
||||
$result_stmt = Database::query($sql);
|
||||
|
||||
@@ -54,16 +54,17 @@ function getRedirectCodes() {
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the redirect-code for a given
|
||||
* returns the redirect-code for a given
|
||||
* domain-id
|
||||
*
|
||||
*
|
||||
* @param integer $domainid id of the domain
|
||||
*
|
||||
* @param string $default
|
||||
*
|
||||
* @return string redirect-code
|
||||
*/
|
||||
function getDomainRedirectCode($domainid = 0) {
|
||||
function getDomainRedirectCode($domainid = 0, $default = '') {
|
||||
|
||||
$code = '';
|
||||
$code = $default;
|
||||
if ($domainid > 0) {
|
||||
|
||||
$result_stmt = Database::prepare("
|
||||
@@ -83,11 +84,11 @@ function getDomainRedirectCode($domainid = 0) {
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the redirect-id for a given
|
||||
* returns the redirect-id for a given
|
||||
* domain-id
|
||||
*
|
||||
*
|
||||
* @param integer $domainid id of the domain
|
||||
*
|
||||
*
|
||||
* @return integer redirect-code-id
|
||||
*/
|
||||
function getDomainRedirectId($domainid = 0) {
|
||||
@@ -112,10 +113,10 @@ function getDomainRedirectId($domainid = 0) {
|
||||
|
||||
/**
|
||||
* adds a redirectcode for a domain
|
||||
*
|
||||
*
|
||||
* @param integer $domainid id of the domain to add the code for
|
||||
* @param integer $redirect selected redirect-id
|
||||
*
|
||||
* @param integer $redirect selected redirect-id
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function addRedirectToDomain($domainid = 0, $redirect = 1) {
|
||||
@@ -130,10 +131,10 @@ function addRedirectToDomain($domainid = 0, $redirect = 1) {
|
||||
/**
|
||||
* updates the redirectcode of a domain
|
||||
* if redirect-code is false, nothing happens
|
||||
*
|
||||
*
|
||||
* @param integer $domainid id of the domain to update
|
||||
* @param integer $redirect selected redirect-id or false
|
||||
*
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function updateRedirectOfDomain($domainid = 0, $redirect = false) {
|
||||
|
||||
@@ -37,7 +37,11 @@ function validateUrl($url) {
|
||||
}
|
||||
|
||||
// needs converting
|
||||
$url = $idna_convert->encode($url);
|
||||
try {
|
||||
$url = $idna_convert->encode($url);
|
||||
} catch (Exception $e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$pattern = "/^https?:\/\/[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,4}(\:[0-9]+)?\/?(.+)?$/i";
|
||||
if (preg_match($pattern, $url)) {
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
// Main version variable
|
||||
$version = '0.9.38';
|
||||
$version = '0.9.38.4';
|
||||
|
||||
// Database version (YYYYMMDDC where C is a daily counter)
|
||||
$dbversion = '201610070';
|
||||
$dbversion = '201611180';
|
||||
|
||||
// Distribution branding-tag (used for Debian etc.)
|
||||
$branding = '';
|
||||
|
||||
@@ -2062,3 +2062,6 @@ $lng['admin']['domain_hsts_incsub']['title'] = 'Include HSTS for any subdomain';
|
||||
$lng['admin']['domain_hsts_incsub']['description'] = 'The optional "includeSubDomains" directive, if present, signals the UA that the HSTS Policy applies to this HSTS Host as well as any subdomains of the host\'s domain name.';
|
||||
$lng['admin']['domain_hsts_preload']['title'] = 'Include domain in <a href="https://hstspreload.appspot.com/" target="_blank">HSTS preload list</a>';
|
||||
$lng['admin']['domain_hsts_preload']['description'] = 'If you would like this domain to be included in the HSTS preload list maintained by Chrome (and used by Firefox and Safari), then use activate this.<br>Sending the preload directive from your site can have PERMANENT CONSEQUENCES and prevent users from accessing your site and any of its subdomains.<br>Please read the details at <a href="hstspreload.appspot.com/#removal" target="_blank">hstspreload.appspot.com/#removal</a> before sending the header with "preload".';
|
||||
|
||||
$lng['serversettings']['nginx_http2_support']['title'] = 'Nginx HTTP2 Support';
|
||||
$lng['serversettings']['nginx_http2_support']['description'] = 'enable http2 support for ssl. ENABLE ONLY IF YOUR Nginx SUPPORT THIS FEATURE. (version 1.9.5+)';
|
||||
|
||||
@@ -1710,6 +1710,6 @@ $lng['admin']['webserversettings_ssl'] = 'Webserver SSL-Einstellungen';
|
||||
$lng['admin']['domain_hsts_maxage']['title'] = 'HTTP Strict Transport Security (HSTS)';
|
||||
$lng['admin']['domain_hsts_maxage']['description'] = '"max-age" Wert für den Strict-Transport-Security Header<br>Der Wert <i>0</i> deaktiviert HSTS für diese Domain. Meist wird der Wert <i>31536000</i> gerne genutzt (ein Jahr).';
|
||||
$lng['admin']['domain_hsts_incsub']['title'] = 'Inkludiere HSTS für jede Subdomain';
|
||||
$lng['admin']['domain_hsts_incsub']['description'] = 'Die optionale "includeSubDomains" Direktive, wenn vorhanden, signalisiert dem UA, dass die HSTS that the HSTS Regel für diese Domain und auch jede Subdomain dieser gilt.';
|
||||
$lng['admin']['domain_hsts_incsub']['description'] = 'Die optionale "includeSubDomains" Direktive, wenn vorhanden, signalisiert dem UA, dass die HSTS Regel für diese Domain und auch jede Subdomain dieser gilt.';
|
||||
$lng['admin']['domain_hsts_preload']['title'] = 'Füge Domain in die <a href="https://hstspreload.appspot.com/" target="_blank">HSTS preload Liste</a> hinzu';
|
||||
$lng['admin']['domain_hsts_preload']['description'] = 'Wenn die Domain in die HSTS preload Liste, verwaltet von Chrome (und genutzt von Firefox und Safari), hinzugefügt werden soll, dann aktiviere diese Einstellung.<br>Die preload-Direktive zu senden kann PERMANTENTE KONSEQUENZEN haben und dazu führen, dass Benutzer auf diese Domain und auch Subdomains nicht zugreifen können.<br>Beachte Details unter <a href="hstspreload.appspot.com/#removal" target="_blank">hstspreload.appspot.com/#removal</a> bevor ein Header mit "preload" gesendet wird.';
|
||||
|
||||
@@ -875,10 +875,8 @@ class apache extends HttpConfigBase
|
||||
if (preg_match('/^https?\:\/\//', $domain['documentroot'])) {
|
||||
$corrected_docroot = $domain['documentroot'];
|
||||
|
||||
// prevent empty return-cde
|
||||
$code = "301";
|
||||
// Get domain's redirect code
|
||||
$code = getDomainRedirectCode($domain['id']);
|
||||
$code = getDomainRedirectCode($domain['id'], '301');
|
||||
$modrew_red = '';
|
||||
if ($code != '') {
|
||||
$modrew_red = ' [R=' . $code . ';L,NE]';
|
||||
|
||||
@@ -432,10 +432,9 @@ class lighttpd extends HttpConfigBase
|
||||
|
||||
if (preg_match('/^https?\:\/\//', $domain['documentroot'])) {
|
||||
$uri = $domain['documentroot'];
|
||||
// prevent empty return-cde
|
||||
$code = "301";
|
||||
|
||||
// Get domain's redirect code
|
||||
$code = getDomainRedirectCode($domain['id']);
|
||||
$code = getDomainRedirectCode($domain['id'], '301');
|
||||
|
||||
$vhost_content .= ' url.redirect-code = ' . $code. "\n";
|
||||
$vhost_content .= ' url.redirect = (' . "\n";
|
||||
@@ -532,14 +531,14 @@ class lighttpd extends HttpConfigBase
|
||||
|
||||
if ($domain['hsts'] >= 0) {
|
||||
|
||||
$vhost_content .= '$HTTP["scheme"] == "https" { setenv.add-response-header = ( "Strict-Transport-Security" => "max-age=' . $domain['hsts'];
|
||||
$ssl_settings .= '$HTTP["scheme"] == "https" { setenv.add-response-header = ( "Strict-Transport-Security" => "max-age=' . $domain['hsts'];
|
||||
if ($domain['hsts_sub'] == 1) {
|
||||
$vhost_content .= '; includeSubDomains';
|
||||
$ssl_settings .= '; includeSubDomains';
|
||||
}
|
||||
if ($domain['hsts_preload'] == 1) {
|
||||
$vhost_content .= '; preload';
|
||||
$ssl_settings .= '; preload';
|
||||
}
|
||||
$vhost_content .= '") }' . "\n";
|
||||
$ssl_settings .= '") }' . "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,15 +196,22 @@ class nginx extends HttpConfigBase
|
||||
}
|
||||
}
|
||||
|
||||
$http2 = $ssl_vhost == true && Settings::Get('system.nginx_http2_support') == '1';
|
||||
|
||||
/**
|
||||
* this HAS to be set for the default host in nginx or else no vhost will work
|
||||
*/
|
||||
$this->nginx_data[$vhost_filename] .= "\t" . 'listen ' . $ip . ':' . $port . ' default_server' . ($ssl_vhost == true ? ' ssl' : '') . ';' . "\n";
|
||||
$this->nginx_data[$vhost_filename] .= "\t" . 'listen ' . $ip . ':' . $port . ' default_server' . ($ssl_vhost == true ? ' ssl' : '') . ($http2 == true ? ' http2' : '') . ';' . "\n";
|
||||
|
||||
$this->nginx_data[$vhost_filename] .= "\t" . '# Froxlor default vhost' . "\n";
|
||||
$this->nginx_data[$vhost_filename] .= "\t" . 'server_name ' . Settings::Get('system.hostname') . ';' . "\n";
|
||||
$this->nginx_data[$vhost_filename] .= "\t" . 'access_log /var/log/nginx/access.log;' . "\n";
|
||||
|
||||
if (Settings::Get('system.use_ssl') == '1' && Settings::Get('system.leenabled') == '1' && Settings::Get('system.le_froxlor_enabled') == '1') {
|
||||
$acmeConfFilename = Settings::Get('system.letsencryptacmeconf');
|
||||
$this->nginx_data[$vhost_filename] .= "\t" . 'include ' . $acmeConfFilename . ';' . "\n";
|
||||
}
|
||||
|
||||
$is_redirect = false;
|
||||
// check for SSL redirect
|
||||
if ($row_ipsandports['ssl'] == '0' && Settings::Get('system.le_froxlor_redirect') == '1') {
|
||||
@@ -217,7 +224,7 @@ class nginx extends HttpConfigBase
|
||||
} else {
|
||||
$_sslport = $this->checkAlternativeSslPort();
|
||||
$mypath = 'https://' . Settings::Get('system.hostname') . $_sslport . '/';
|
||||
$this->nginx_data[$vhost_filename] .= "\t" . 'if ($request_uri !~ "^/\.well-known/acme-challenge/\w+$") {' . "\n";
|
||||
$this->nginx_data[$vhost_filename] .= "\t" . 'if ($request_uri !~ ^/.well-known/acme-challenge/\w+$) {' . "\n";
|
||||
$this->nginx_data[$vhost_filename] .= "\t\t" . 'return 301 ' . $mypath . '$request_uri;' . "\n";
|
||||
$this->nginx_data[$vhost_filename] .= "\t" . '}' . "\n";
|
||||
}
|
||||
@@ -411,7 +418,9 @@ class nginx extends HttpConfigBase
|
||||
$_vhost_content .= $this->processSpecialConfigTemplate($ipandport['default_vhostconf_domain'], $domain, $domain['ip'], $domain['port'], $ssl_vhost) . "\n";
|
||||
}
|
||||
|
||||
$vhost_content .= "\t" . 'listen ' . $ipport . ($ssl_vhost == true ? ' ssl' : '') . ';' . "\n";
|
||||
$http2 = $ssl_vhost == true && Settings::Get('system.nginx_http2_support') == '1';
|
||||
|
||||
$vhost_content .= "\t" . 'listen ' . $ipport . ($ssl_vhost == true ? ' ssl' : '') . ($http2 == true ? ' http2' : '') . ';' . "\n";
|
||||
}
|
||||
|
||||
// get all server-names
|
||||
@@ -460,12 +469,11 @@ class nginx extends HttpConfigBase
|
||||
if (substr($uri, - 1) == '/') {
|
||||
$uri = substr($uri, 0, - 1);
|
||||
}
|
||||
// prevent empty return-cde
|
||||
$code = "301";
|
||||
// Get domain's redirect code
|
||||
$code = getDomainRedirectCode($domain['id']);
|
||||
|
||||
$vhost_content .= "\t" . 'if ($request_uri !~ "^/\.well-known/acme-challenge/\w+$") {' . "\n";
|
||||
// Get domain's redirect code
|
||||
$code = getDomainRedirectCode($domain['id'], '301');
|
||||
|
||||
$vhost_content .= "\t" . 'if ($request_uri !~ ^/.well-known/acme-challenge/\w+$) {' . "\n";
|
||||
$vhost_content .= "\t\t" . 'return ' . $code .' ' . $uri . '$request_uri;' . "\n";
|
||||
$vhost_content .= "\t" . '}' . "\n";
|
||||
} else {
|
||||
|
||||
@@ -27,7 +27,7 @@ $header
|
||||
<th>{$lng['admin']['ipsandports']['ip']} {$arrowcode['ip']}</th>
|
||||
<th>{$lng['admin']['ipsandports']['port']} {$arrowcode['port']}</th>
|
||||
<if !$is_nginx><th>Listen</th></if>
|
||||
<if $is_apache><th>NameVirtualHost</th></if>
|
||||
<if $is_apache && !$is_apache24><th>NameVirtualHost</th></if>
|
||||
<th>vHost-Container</th>
|
||||
<th>Specialsettings</th>
|
||||
<if $is_apache><th>ServerName</th></if>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<td>{$row['ip']}</td>
|
||||
<td>{$row['port']}</td>
|
||||
<if !$is_nginx><td><if $row['listen_statement']=='1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td></if>
|
||||
<if $is_apache><td><if $row['namevirtualhost_statement']=='1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td></if>
|
||||
<if $is_apache && !$is_apache24><td><if $row['namevirtualhost_statement']=='1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td></if>
|
||||
<td><if $row['vhostcontainer']=='1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td>
|
||||
<td><if $row['specialsettings']!=''>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td>
|
||||
<if $is_apache><td><if $row['vhostcontainer_servername_statement']=='1'>{$lng['panel']['yes']}<else>{$lng['panel']['no']}</if></td></if>
|
||||
|
||||
Reference in New Issue
Block a user