Kirby vs ssl on multi-domain setup

Hello everyone,
I’m working on my site in mulit-domain setup. There’s 4 subdomains and each has its virtual host 80 defined in httpd.conf. Everything was working quite swiftly until I added port 443 with SSL. Initially I only did that for the blog.example.com, but along the line I tried out different combinations.

Another page, terms.example.com is now returning 500 and some files on the blog, like images, are 403. The two remaining sites are fine.
I’m working on aws redhat with apache 2.4

Any suggestions?

That’s most likely not a Kirby issue. But maybe we can help you anyway if you post the relevant parts from your Apache configuration.

Thank you for replying :smile:
I know that kirby can trip without the home directory: on that particular page I had my folders arranged like this:
0-home 1-page 2-page
Which worked both for testing and production servers. Since the SSL installation I had
PHP Fatal error: Call to a member function isErrorPage() on a non-object in /var/www/html/kirby/kirby.php on line 366

This tends to be related to the folder setup, so I changed it to just ‘home’ but it doesn’t seem to make a difference. On error log I get these every time I try to refresh:

PHP Warning: scandir(): (errno 2): No such file or directory in /var/www/html/kirby/core/page.php on line 294 PHP Warning: array_diff(): Argument #1 is not an array in /var/www/html/kirby/core/page.php on line 294 PHP Warning: Invalid argument supplied for foreach() in /var/www/html/kirby/core/page.php on line 310 PHP Fatal error: Call to a member function isErrorPage() on a non-object in /var/www/html/kirby/kirby.php on line 366

This is not the case for other sites, so do you reckon there is something I could improve on kirby side?

That actually looks like you don’t have a page named error.

I do, got error folder with error.txt in it.
Had a fair share of issues due to its lack but I finally learned

The interesting thing is that I have a copy of the exact code running on the production server, but on staging, where I now try out the ssl setup, it goes awry

Hmm. This error shouldn’t come from using TLS. Could you please verify again that the code on both servers is the same and everything has been copied correctly?

If the error persists, try disabling your new Apache configuration anyway. Maybe there’s something in there that modifies the environment of PHP.

How did you copied the files to your staging server? Sometimes when I clone some project or the kirby repository, I forget to clone recursively, so that the toolkit folder exists, but it´s empty.

Another idea is, that the server does not redirect the requests to the correct directory (website), because there are multiple sites on one IP-Adress. Does all of your sites on the staging server work by calling them via http instead of https?
It just came to my mind, that it could have something to do with Server Name Indication and getting the right requests to the right directory with the right certificate.

It turns out that indeed it was not a kirby issue at all.
I scraped the files from the server and copied them again, to be sure that none of the files was corrupted, and in the end it turned out that the key from CA was generated using wrong value (it’s a multi-domain, not a wildcard)

So, case dismissed :slight_smile: