Page 1 of 1

WEbhosting server DocumentRoot is var/www instead of /home/user

Posted: Sat Oct 21, 2017 8:22 pm
by adamjedgar
what is the default vestacp website directory for all webhosting clients on my debian server?

I think i may have made a mistake in setting my default vestacp user home directory. I also have other servers that by default set new website home directory to
/home/clent/web/domain.com/public_html

my vestacp users home directory is as above, however, when i copy files into the above path for new users websites the default apache "it works" page is still being displayed. I am sure that the problem is that apache is continuing to see the default DocumentRoot for all new users domain websites as

/var/www/

I am not sure what is the best way to fix this?
Should i change user home directory or change the apache configuration? (how do i make the changes required?)
Should there be simlink from /var/www to /home/client/web/...?

Re: WEbhosting server DocumentRoot is var/www instead of /home/user

Posted: Sat Oct 21, 2017 9:32 pm
by mehargags
On users tab, select the VestaCP user(s) and REBUILD WEB for the user/s. This should fix this

Re: WEbhosting server DocumentRoot is var/www instead of /home/user

Posted: Sun Oct 22, 2017 4:27 am
by adamjedgar
mehargags wrote:On users tab, select the VestaCP user(s) and REBUILD WEB for the user/s. This should fix this
I am logged in as system administrator, however, after selecting the user in question, I cannot find "REBUILD WEB" for the user/s. Where is this option?

can i simply do this from command? I am not 100%sure of what to type but is it something like

do v-rebuild-web-domains $user;

from which directory should i do this in command as the root user?

Finally, i would just like to clarify...

According to /etc/apache2/sites-available/000-default.conf

DocumentRoot /var/www/html

However, according to vestacp, new ftp users home directories are
/home/client/web/foo.com.au

I dont understand why in a default installation they are different? (this must be why my web directory is displaying the default apache "It Works" page even though i have uploaded files...ftp client has uploaded to the wrong web directory)

Re: WEbhosting server DocumentRoot is var/www instead of /home/user

Posted: Sun Oct 22, 2017 12:49 pm
by mehargags
You are doing it way too hard then neccessary.

To rebuild web through Web interface
https://prnt.sc/h0huho



To do it over CLI in bash, use the command

Code: Select all

cd /usr/local/vesta/bin/
v-rebuild-user
v-rebuild-web-domains

Re: WEbhosting server DocumentRoot is var/www instead of /home/user

Posted: Sun Oct 22, 2017 7:59 pm
by adamjedgar
ah ok..thanks i found it now.

ok, so after performing the "build" operation, nothing changes.

Apache is not displaying the default vesta apache page with "Powered by Vesta" at the bottom, rather its displaying the standard default apache index.html page (that does not contain Powered by Vesta).

Its ok, i have finally found the problem...its a dns stuff up on my part. Had a wrong registry A record pointing the domain name to wrong one of my servers (i thought i had already checked this doh!)