@@ -581,7 +581,7 @@ public function configure_nginx(){
581581 exec ('mkdir -p ' .$ conf ['nginx ' ]['vhost_conf_enabled_dir ' ]);
582582 exec ('mkdir -p ' .$ conf ['nginx ' ]['vhost_conf_dir ' ]);
583583
584- wf ('/etc/nginx/conf.d/ispconfig_vhosts.conf ' ,"include /etc/nginx/sites-enabled/*.conf ; " );
584+ wf ('/etc/nginx/conf.d/ispconfig_vhosts.conf ' ,"include /etc/nginx/sites-enabled/*; " );
585585
586586 //* make sure that webalizer finds its config file when it is directly in /etc
587587 if (@is_file ('/etc/webalizer.conf ' ) && !@is_dir ('/etc/webalizer ' )) {
@@ -854,8 +854,14 @@ public function install_ispconfig()
854854 // TODO: FIXME: add the www-data user to the ispconfig group. This is just for testing
855855 // and must be fixed as this will allow the apache user to read the ispconfig files.
856856 // Later this must run as own apache server or via suexec!
857- $ command = 'usermod -a -G ispconfig ' .$ conf ['apache ' ]['user ' ];
858- caselog ($ command .' &> /dev/null ' , __FILE__ , __LINE__ , "EXECUTED: $ command " , "Failed to execute the command $ command " );
857+ if ($ conf ['apache ' ]['installed ' ] == true ){
858+ $ command = 'usermod -a -G ispconfig ' .$ conf ['apache ' ]['user ' ];
859+ caselog ($ command .' &> /dev/null ' , __FILE__ , __LINE__ , "EXECUTED: $ command " , "Failed to execute the command $ command " );
860+ }
861+ if ($ conf ['nginx ' ]['installed ' ] == true ){
862+ $ command = 'usermod -a -G ispconfig ' .$ conf ['nginx ' ]['user ' ];
863+ caselog ($ command .' &> /dev/null ' , __FILE__ , __LINE__ , "EXECUTED: $ command " , "Failed to execute the command $ command " );
864+ }
859865
860866 //* Make the shell scripts executable
861867 $ command = "chmod +x $ install_dir/server/scripts/*.sh " ;
0 commit comments