Error 500 on subdomain with custom root

Hi All,

I’m migrating some sites from a managed ISP to a Hestia environment and already have one domain/site working well on it. It’s a simple website with minimal dynamic content, so only required a bit of tweaking of paths, etc. Now I’m attempting to move a second more complicated site over so want to work on troubleshooting the code before pointing the domain to the Hestia server. I figured I could do this by creating a subdomain of the first domain and use custom document root to point at the second site - ie, seconddomain.firstdomain.tld points to seconddomain.tld in Web -> Edit Web Domain. All domains are owned by admin.

Ok, so when I launch seconddomain.firstdomain.tld I’m getting a 500 error, which is hardly surprising given I’ve just dumped all this code from another server in a different environment, but when I added error reporting to index.php I get no error reports. When I then changed the name of index.php to index2.php and added a fresh index.php doc which just contained the text ‘Hello World’, still the 500 error.

Have I misunderstood the way HestiaCP handles the subdomain and doc root, or missed some other setting?


Hi Pete

Just create a second, own, webdomain with seconddomain.firstdomain.tld, your plan with alias will probaly not work.

Also if you want to validate if the website is working properly, you got the following two plans:

  1. Create the webdomain, adjust your host file and point the domain name to your server ip.


  1. Create a webdomain with the original domain name, add a alias like test.domain.tld.


So if firstdomain.tld is pointing at the Hestia box, but seconddomain.tld is still pointing at the current (live) server at another ISP, I can’t use a subdomain of firstdomain.tld to access the site I’m building in beta? Or am I misunderstanding? I thought by creating a ‘Web’ in Hestia called seconddomain.firstdomain.tld with the doc root of the new site, I’m doing what you suggest in #2?


if you get a 500 error check the logfiles, to see what causes this. if you dumped in the files from an archive, you might need to adjust the owner and group.

also check the permissions of files and folders, they could be different on different control panels.

and please! do NOT just run chmod -R !

yes, you can create seconddomain.firstdomain.tld as a seperate/new web-domain in hestia, @ScIT just suggested in 2) to use the real second domain for that already and use the seconddomain.firstdomain.tld as alias in that.
with that you can later on simply switch over the second domain and have already a meaningful path in the system itself (because the primary domain you put as webdomain is going to be part of that path)

PS: if your domain data comes with a .htaccess also check, that there is no absolute path in it. that for sure could cause a 500 already…

You’re absolutely correct. And the error files told me so. Should have looked there first!



1 Like

glad you were able to solve it :metal:t2:

I’d consider it normal to need some time to get used to the way Hestia handles things or how permissions are expected to be, where the logfiles are etc. - so all good, if you give yourself that time to familiarize you are gonna get there soon :smiley:

Thanks falzo - and to all the members of this community who incredibly patient with us noobies who are coming to Hestia fresh.


1 Like

haha, thanks for the kind words.
however, I have to admit we are not always patient. we still expect a bit of basic knowledge in system administration and engagement to self-solve problems. lack of that sometimes lead to some of us being more or less “+/- friendly” - if you understand what that’s supposed to mean :joy: :joy: :joy:


What @ScIT suggested about using the real domain name (for tests) and adjust your computer’s hosts file to access it, is indeed correct. One other way is to use Fiddler as a proxy and adjust Fiddler’s hosts. Configure one browser to use Fiddler proxy to connect to test site and use another browser to connect to Live site.

More info about that method, here.

1 Like