Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion
  • Search

"Error: web template not found" when trying to add domain - Templates folder looks okay?

General questions about VestaCP
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
weirdaljr
Posts: 14
Joined: Tue Jul 28, 2015 2:46 pm

"Error: web template not found" when trying to add domain - Templates folder looks okay?
  • Quote

Post by weirdaljr » Thu Feb 11, 2016 12:04 am

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?

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
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: "Error: web template not found" when trying to add domain - Templates folder looks okay?
  • Quote

Post by tjebbeke » Thu Feb 11, 2016 8:04 am

one of your templates names 'default.tpl.save', this is wrong, you need to change this to 'default.tpl'
Top

weirdaljr
Posts: 14
Joined: Tue Jul 28, 2015 2:46 pm

Re: "Error: web template not found" when trying to add domain - Templates folder looks okay?
  • Quote

Post by weirdaljr » Thu Feb 11, 2016 10:08 am

tjebbeke wrote:one of your templates names 'default.tpl.save', this is wrong, you need to change this to 'default.tpl'
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.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: "Error: web template not found" when trying to add domain - Templates folder looks okay?
  • Quote

Post by tjebbeke » Thu Feb 11, 2016 10:27 am

weirdaljr wrote:
tjebbeke wrote:one of your templates names 'default.tpl.save', this is wrong, you need to change this to 'default.tpl'
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.
Oh Sorry, I didn't notice that the default.tpl was there.

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
}
So I don't see why you have this error.
Top

weirdaljr
Posts: 14
Joined: Tue Jul 28, 2015 2:46 pm

Re: "Error: web template not found" when trying to add domain - Templates folder looks okay?
  • Quote

Post by weirdaljr » Thu Feb 11, 2016 2:05 pm

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.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: "Error: web template not found" when trying to add domain - Templates folder looks okay?
  • Quote

Post by tjebbeke » Thu Feb 11, 2016 4:29 pm

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.
-e checks if file exist.

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
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “General Discussion”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password