Skip to content

Commit 783ebe6

Browse files
committed
Exclude the io expensive calls on vhostsubdomain as well.
1 parent 9f4a580 commit 783ebe6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/plugins-available/nginx_plugin.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -820,8 +820,8 @@ function update($event_name, $data) {
820820
}
821821
}
822822
// Set the a+r mod to the web_folder.
823-
// Skip this for vhostalias if the web_folder is "web". In this case, everything is setup already from the vhost setup
824-
if ($data['new']['type'] != 'vhostalias' || $web_folder != 'web') {
823+
// Skip this for types where the target vhost already exists if the web_folder is "web". In this case, everything is setup already from the vhost setup
824+
if ( ( $data['new']['type'] != 'vhostalias' && $data['new']['type'] != 'vhostsubdomain' ) || $web_folder != 'web') {
825825
$app->system->exec_safe('chmod -R a+r ?', $data['new']['document_root'].'/' . $web_folder . '/');
826826
}
827827

@@ -878,8 +878,8 @@ function update($event_name, $data) {
878878

879879
if($this->action == 'insert' || $data["new"]["system_user"] != $data["old"]["system_user"]) {
880880
// Chown and chmod the directories below the document root
881-
// Skip this for vhostalias if the web_folder is "web". In this case, everything is setup already from the vhost setup
882-
if ($data['new']['type'] != 'vhostalias' || $web_folder != 'web') {
881+
// Skip this for types where the target vhost already exists if the web_folder is "web". In this case, everything is setup already from the vhost setup
882+
if ( ( $data['new']['type'] != 'vhostalias' && $data['new']['type'] != 'vhostsubdomain' ) || $web_folder != 'web') {
883883
$app->system->exec_safe( 'chown -R ?:? ?', $username, $groupname, $data['new']['document_root'] . '/' . $web_folder );
884884
}
885885
// The document root itself has to be owned by root in normal level and by the web owner in security level 20

0 commit comments

Comments
 (0)