Can't change document root

Hello, I have a fresh installation of HestiaCP on ubuntu 22.
I need to change a document root directory for the laravel project but GUI gives me an error that the directory doesn’t exist.

Error: Directory /home/my-laravel-domain/web/ does not exist under /home/my-laravel-domain/web/

The ‘public’ folder does exist, I can simply cd to it from the shell. I tried to change permissions with this:

chown -R my-laravel-domain:www-data /home/my-laravel-domain/web/

Didn’t help…

Hi @tonyandr,

Are you sure my-laravel-domain is your Hestia user and is assigned to that user?

Show the output of these commands (replacing YourUser and YourDomain with the actual data) and executing them as root:

namei -mo /home/YourUSer/web/YourDomain/public_html/public/
v-list-web-domain YourUser YourDomain json | jq -r '.[].DOCUMENT_ROOT'

Yes, i created a user and then added websites to it using heastia panel.

The output for your command with the actual data is below:

root@admin:~# namei -mo /home/link-indexing-bot/web/
v-list-web-domain link-indexing-bot json | jq -r '.[].DOCUMENT_ROOT'
f: /home/link-indexing-bot/web/
 drwxr-xr-x root              root              /
 drwxr-xr-x root              root              home
 drwxr-x--x root              root              link-indexing-bot
 drwxr-xr-x root              link-indexing-bot web
 dr-xr-x--x link-indexing-bot link-indexing-bot
 drwxr-x--x link-indexing-bot www-data          public_html
 drwxr-xr-x link-indexing-bot www-data          public

That’s because you are adding the new document root as /home/link-indexing-bot/web/ and you only need to add public


1 Like

Oh… I see now, thank you.
I knew its something silly like that…

1 Like