I created website, been working fine for months. I recently needed to add more websites for that client, so created new client, now I changed client in that website, after client change is saved successfully, website does not load. If I change client back to original at the time of website creation, it starts to work fine again. I resynced websites from Tools, still that website does not work, but again if I change it back, it works fine. Any guess, what's going wrong.
Most likely wrong path specified somewhere in your website (or database if you have any). Path is /var/www/clients/<client id>/<web id> Path will change when you change the client.
Seems like permissions are right, client2 is correct, I am moving this website from client1 to client2. any command I should run on top of below output? # ls -l total 32 drwxr-xr-x 2 root root 4096 Aug 7 2023 backup drwxr-xr-x 2 web12 client2 4096 Aug 7 2023 cgi-bin drwxr-xr-x 2 root root 4096 Oct 13 17:31 log drwx--x--- 2 web12 client2 4096 Aug 7 2023 private drwxr-xr-x 2 root root 4096 Aug 7 2023 ssl drwxrwx--- 2 web12 client2 4096 Oct 9 09:09 tmp drwxrwxrwx 7 web12 client2 4096 Oct 10 18:38 web drwx--x--- 2 web12 client2 4096 Aug 7 2023 webdav
The permissions are fine. Which exact error message do you get in the browser and in the error.log of the website?
Like @till said, what errors do the browser and logs give you. I suspect somewhere in the website itself the path is specified. And now that you've changed the client that specified path isn't correct anymore and needs to be altered.
is it a wordpress site? is php on the site chrooted? most likely the full path is used all over the place in the wordpress database.. you can search for that and change it, if you're just changing eg client1 to client2, you can probably just get away with changing it manually, ie dump the db, use sed to change it, re-import the db.. if the length of the string changes, eg from client1 to client15, then the changes need to be done by something wordpress aware... otherwise all the string length indicators need changing manually too, and the regex for that is horrendous. either way, using something like wp-cli would be the easiest way to change it.. and it'll let you do dry-runs, so you can test what it'll change first. you might also have some website files that include the full path that will need changing.. eg .user.ini and .wordfence-waf if you have wordfence installed.. the site will definitely not work if those files have the wrong path... other plugin files may include the full folder path for the site as well.