We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
How to Change Template of Domain Creation [SOLVED]
How to Change Template of Domain Creation [SOLVED]
In a given USER in vestacp I want all all subdomains to point to MAIN DOMAINS'S folder with and without https.
like this: /home/USER/web/MAIN-DOMAIN/public_html
The default in Vesta CP is /home/USER/web/SUB-DOMAIN/public_html
Can I define this in any template?
I have achieved this by editing the file and changing root directory mentioned below
/home/USER/conf/web/SUB-DOMAIN.httpd.conf
But I am facing two problems in this.
1. Each time when I ceate a subdomain I need to edit this file.
2. Secondly When I create SSL Using Lets Encrypt it goes back to original setting.
So please guide me for these two problems.
1. The root directory of any new subdomain can be defined in any template for the USER
2. SSL application shall not affect the root directory.
like this: /home/USER/web/MAIN-DOMAIN/public_html
The default in Vesta CP is /home/USER/web/SUB-DOMAIN/public_html
Can I define this in any template?
I have achieved this by editing the file and changing root directory mentioned below
/home/USER/conf/web/SUB-DOMAIN.httpd.conf
But I am facing two problems in this.
1. Each time when I ceate a subdomain I need to edit this file.
2. Secondly When I create SSL Using Lets Encrypt it goes back to original setting.
So please guide me for these two problems.
1. The root directory of any new subdomain can be defined in any template for the USER
2. SSL application shall not affect the root directory.
Re: How to Change Template of Domain Creation [SOLVED]
Edit following files One By One and Change the Root Directory to a Fixed Path you want to set
1. /usr/local/vesta/data/templates/web/httpd/basedir.stpl
2. /usr/local/vesta/data/templates/web/httpd/basedir.tpl
3. /usr/local/vesta/data/templates/web/httpd/default.stpl
4. /usr/local/vesta/data/templates/web/httpd/default.tpl
5. /usr/local/vesta/data/templates/web/httpd/hosting.stpl
6. /usr/local/vesta/data/templates/web/httpd/hosting.tpl
Once you are done run this command
# v-rebuild-user USER
1. /usr/local/vesta/data/templates/web/httpd/basedir.stpl
2. /usr/local/vesta/data/templates/web/httpd/basedir.tpl
3. /usr/local/vesta/data/templates/web/httpd/default.stpl
4. /usr/local/vesta/data/templates/web/httpd/default.tpl
5. /usr/local/vesta/data/templates/web/httpd/hosting.stpl
6. /usr/local/vesta/data/templates/web/httpd/hosting.tpl
Once you are done run this command
# v-rebuild-user USER
Re: How to Change Template of Domain Creation [SOLVED]
In my case the command works with full path
$ /usr/local/vesta/bin/v-rebuild-user USER
$ /usr/local/vesta/bin/v-rebuild-user USER
Re: How to Change Template of Domain Creation [SOLVED]
To continue this topic I'd like to raise an additional question. Backup of custom paths is not working properly in my case.
I changed the default folder from /domain.com/ to /domain/, but Vesta makes backup copies of /web/admin/domain.com/ instead of /web/admin/domain/. What do I need to tweak?
I changed the default folder from /domain.com/ to /domain/, but Vesta makes backup copies of /web/admin/domain.com/ instead of /web/admin/domain/. What do I need to tweak?
Re: How to Change Template of Domain Creation [SOLVED]
In Debian installation the path is below
/usr/local/vesta/data/templates/web/apache2/default.tpl
/usr/local/vesta/data/templates/web/apache2/default.stpl
In order to Remove BaseDir restriction for moodle installation create a copy of these two files and remove the line with open_basedir restriction as below
php_admin_value open_basedir %docroot%:%home%/%user%
/usr/local/vesta/data/templates/web/apache2/default.tpl
/usr/local/vesta/data/templates/web/apache2/default.stpl
In order to Remove BaseDir restriction for moodle installation create a copy of these two files and remove the line with open_basedir restriction as below
php_admin_value open_basedir %docroot%:%home%/%user%
Re: How to Change Template of Domain Creation [SOLVED]
I request to VestaCP team!
This feature, must be add on vesta control panel...!
It's most useful...!
This feature, must be add on vesta control panel...!
It's most useful...!