Nginx conf - templates for Backdrop CMS - Drupal

Hi, I’m in the process to move my sites from a server where I have Vesto to one where I have an Hestia Installation.
I Installed the Nginx + php version only, no apache (Lemp?)
I have a problem with the first site migrated : a Drupal based Backdrop CMS installation:
using the default configs, I had to disable clean urls to make it work…
On Vesta, I could simply select the “Drupal Nginx Template” i domain panel, and everything would work. Here I can select the php version I wanna use, but it haves little use with drupal…
I assume on Hestia I will have to modify the files: /home/admin/conf/web/domainname/ nginx.conf and nginx.ssl.conf to make it work, but using the relevant part of vesta configuration I just get a 500 error, even after restarting nginx… any help? Is there also any way to implement “templates”? I’m concerned that at the first update I will lose the modification to the nginx.conf files that I made…

Hello @kurageart nginx+fpm will give you the same templates you had on Vesta, if you see something different please share your full Hestia install cmd

1 Like

For the migration part: you can use v-restore-user script with vesta backups, we’re still compatible with it.

Do not touch the configuration files in /home/user/conf, they will be rebuild on every upgrade and would got lost.

As @Lupu already wrote: You should have on a nginx+phpfpm installation the dropbox, if you use multiphp you can consider to upgrade to our release candidate 1.1.0, which have a reworked multiphp environment: Release data for version Ver 1.1

well, I don’t have that panel… I assume it is in the domain configuration section, right? In “web templates”, I can only select the php version…

I think web templates were not installed… Maybe I did some errors in installing Hestia…
[email protected]:~# v-list-web-templates
[email protected]:~# v-list-web-templates-backend
[email protected]:~# v-list-w

As @Lupu already wrote, please share your installation string. But basicly it looks like you’ve installed multiphp, so please consider to use the release candidate as written in my post. There you should get the dropdown.

Ah, and well, since I’m here, I’m asking if there is a proper template to simply redirect 301 an old domain to the new one (all the pages). I managed to do that by editing the nginx conf for the old domain, but the changes will be lost, obviously, if I upgrade to rc candidate…
I think the installation string was this (just removed sensitive datas)
bash -n yes -w yes -t no -c no -x no -z no -b yes -i yes -m yes -l en -o yes \ -s -e [email protected] -p MyPassword -a no -k no

Just do the upgrade and let me know, if it works. If you post install strings, please consider to send them in full length, so we do not have to “decode” them on our own :smiley:.

Ah, I get what you mean. So, if i understand correctly, in current version if install multiphp, I don’t get the web templates, right? That’s why I’ll have to update to rc version…
bash --nginx yes --phpfpm yes --spamassassin no --clamav no --exim no --dovecot no --fail2ban yes --iptables yes --mysql yes --lang en --multiphp yes \ --hostname --email [email protected] --password MyPassword --apache no --named no

Yes, you’re completly right, MultiPHP was reworked in the new release, which is currently in testing as RC.

Updated… now I get both multiphp selector AND template selector… Have to wait for a records to propagate, then I’ll be able to know if everything works… Is there a way to redirect an old domain to a new one directly from hestiacp (using nginx)? As I said, for this specific old domain I had to manually alter the /home/admin/conf/web/ nginx conf , nginx.ssl.conf . I know that using apache I would just have to create a proper .htaccess … but with nginx? Just as a suggestion, it would be great if it were a template for this specific task…

you could do this over php redirect:

1 Like

Oh, You mean creating an index.php file inside the old domain public_http folder with this code?

Oh, well, it works for the homepage, but not for all the urls sill indexed by google…

This is something you should be able to find on your own, if you would like to use nginx, you could also use the custom config include directives from our default templates:

So you could create a custom config under /home/user/conf/web/nginx/domain.tld/nginx.ssl.conf_yourconfig

you can redirect under server block google friendly with

server {

if ($host = ‘’) {
return 301$request_uri;

As I already wrote: I do not suggest to edit the nginx configuraiton files directy, better use the custom include for such actions - otherwise they will be overwritten on a new release.

1 Like

I have tested this now and can confirm a custom nginx redirect works as expected, including all urls (not only homepage).

echo 'return 301$request_uri;' |sudo tee /home/USER/conf/web/OLDWEBDOMAIN/nginx.conf_redir
sudo systemctl reload nginx

ps: replace USER, OLDWEBDOMAIN, NEWDOMAIN with your values

@kurageart let us know if works on your setup too.

Not working here (debian 9 vps), but thanks. I believe that pointing the old domain to a new one is a quite common problematic, and it should be addressed by hestiacp itself, since people installing a control panel are not usually the most tech savy. This was also a quite asked topic on Vesta, I guess for now I’ll make a temp wordpress install with some sort of redirect plugin… But I’m very open to new solutions…

Well, actually, after few minutes, everything works, just as You said… in case of update it should keep working, right?