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.
"Error: web template not found" when trying to add domain - Templates folder looks okay?
"Error: web template not found" when trying to add domain - Templates folder looks okay?
Hello,
I wanted to see if anyone could point me in the right direction of what could be causing the "Error: web template not found" when trying to add a new domain in VestaCP. I checked what i thought was the correct template folders and the files all seem to be there, but I wasn't sure what else this error could be referring to?
I wanted to see if anyone could point me in the right direction of what could be causing the "Error: web template not found" when trying to add a new domain in VestaCP. I checked what i thought was the correct template folders and the files all seem to be there, but I wasn't sure what else this error could be referring to?
Code: Select all
/usr/local/vesta/data/templates/web/apache2# ls
basedir.stpl default.stpl hosting.stpl phpfcgid.sh phpfcgid.tpl
basedir.tpl default.tpl hosting.tpl phpfcgid.stpl
/usr/local/vesta/data/templates/web/nginx# ls
caching.stpl default.stpl default.tpl.save hosting.stpl proxy_ip.tpl
caching.tpl default.tpl hosting.sh hosting.tpl
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: "Error: web template not found" when trying to add domain - Templates folder looks okay?
one of your templates names 'default.tpl.save', this is wrong, you need to change this to 'default.tpl'
Re: "Error: web template not found" when trying to add domain - Templates folder looks okay?
Thanks for the reply. I wasn't sure if you noticed the main default.tpl was there too... the .save was just a backup I made, but I tried removing the backup just to check as well as making sure the default.tpl was the original file and it didn't impact the error.tjebbeke wrote:one of your templates names 'default.tpl.save', this is wrong, you need to change this to 'default.tpl'
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: "Error: web template not found" when trying to add domain - Templates folder looks okay?
Oh Sorry, I didn't notice that the default.tpl was there.weirdaljr wrote:Thanks for the reply. I wasn't sure if you noticed the main default.tpl was there too... the .save was just a backup I made, but I tried removing the backup just to check as well as making sure the default.tpl was the original file and it didn't impact the error.tjebbeke wrote:one of your templates names 'default.tpl.save', this is wrong, you need to change this to 'default.tpl'
This is the code to check if the template is valid:
Code: Select all
is_web_template_valid() {
t="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.tpl"
s="$WEBTPL/$WEB_SYSTEM/$WEB_BACKEND/$template.stpl"
if [ ! -e $t ] || [ ! -e $s ]; then
echo "Error: web template $template not found"
log_event "$E_NOTEXIST" "$EVENT"
exit $E_NOTEXIST
fi
}
# Proxy template check
is_proxy_template_valid() {
proxy=$1
t="$WEBTPL/$PROXY_SYSTEM/$proxy.tpl"
s="$WEBTPL/$PROXY_SYSTEM/$proxy.stpl"
if [ ! -e $t ] || [ ! -e $s ]; then
echo "Error: proxy template $proxy not found"
log_event "$E_NOTEXIST" "$EVENT"
exit $E_NOTEXIST
fi
}
Re: "Error: web template not found" when trying to add domain - Templates folder looks okay?
Looking at that code if that is the only thing that could cause it could the variables not be set? What is the -e checking for? I assume it is a error checking routine of sorts, but I do not know the code to debug.
-
- Collaborator
- Posts: 783
- Joined: Mon May 11, 2015 8:43 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: "Error: web template not found" when trying to add domain - Templates folder looks okay?
-e checks if file exist.weirdaljr wrote:Looking at that code if that is the only thing that could cause it could the variables not be set? What is the -e checking for? I assume it is a error checking routine of sorts, but I do not know the code to debug.
The vars:
BIN=$VESTA/bin
USER_DATA=$VESTA/data/users/$user
WEBTPL=$VESTA/data/templates/web
DNSTPL=$VESTA/data/templates/dns
$WEB_SYSTEM & $WEB_BACKEND & $PROXY_SYSTEM are defined in /usr/local/vesta/conf/vesta.conf