mirror of
https://github.com/cytopia/devilbox.git
synced 2024-12-24 06:56:40 +00:00
Intranet: Reverse Proxy/Websockets do not need a htdocs directory
This commit is contained in:
parent
299b765652
commit
1ba3cd399c
@ -29,10 +29,18 @@ class Httpd extends BaseClass implements BaseInterface
|
|||||||
$url = 'http://'.$domain;
|
$url = 'http://'.$domain;
|
||||||
$error = array();
|
$error = array();
|
||||||
|
|
||||||
// 1. Check htdocs folder
|
|
||||||
if (!$this->_is_valid_dir($docroot)) {
|
$backend = $this->getVhostBackend($vhost);
|
||||||
$error[] = 'error';
|
$pos_def = strpos($backend, 'default');
|
||||||
$error[] = 'Missing <strong>'.$htdocs.'</strong> directory in: <strong>'.loadClass('Helper')->getEnv('HOST_PATH_HTTPD_DATADIR').'/'.$vhost.'/</strong>';
|
$pos_phpfpm = strpos($backend, 'tcp://');
|
||||||
|
|
||||||
|
// Only if backend 'default' or 'phpfpm', we need a htdocs/ directory
|
||||||
|
if ( ($pos_def !== false && $pos_def == 0) || ($pos_phpfpm !== false && $pos_phpfpm == 0) ) {
|
||||||
|
// 1. Check htdocs folder
|
||||||
|
if (!$this->_is_valid_dir($docroot)) {
|
||||||
|
$error[] = 'error';
|
||||||
|
$error[] = 'Missing <strong>'.$htdocs.'</strong> directory in: <strong>'.loadClass('Helper')->getEnv('HOST_PATH_HTTPD_DATADIR').'/'.$vhost.'/</strong>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. Check internal DNS server
|
// 2. Check internal DNS server
|
||||||
|
Loading…
Reference in New Issue
Block a user