Skip to content

Commit 9f5021e

Browse files
committed
fix nginx error on suspend
1 parent e7b6be8 commit 9f5021e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

nodeapp.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,15 @@ public function priv_suspend_web_domain( $args ) {
140140
$user = $args[0];
141141
$domain = $args[1];
142142
$nodeapp_folder = "/home/$user/web/$domain/nodeapp";
143+
144+
// Remove prior nginx config files; duplicate location "/" will cause nginx to fail
145+
if ( file_exists( "/home/$user/conf/web/$domain/nginx.ssl.conf_nodeapp" ) ) {
146+
unlink( "/home/$user/conf/web/$domain/nginx.ssl.conf_nodeapp" );
147+
}
148+
if ( file_exists( "/home/$user/conf/web/$domain/nginx.conf_nodeapp" ) ) {
149+
unlink( "/home/$user/conf/web/$domain/nginx.conf_nodeapp" );
150+
}
151+
143152
$this->shutdown_apps( $nodeapp_folder );
144153
return $args;
145154
}

0 commit comments

Comments
 (0)