Panel throws Error 502

Hi, I just moved my Kirby website to a new apache webserver (which I don’t administrate). Everything used to run smooth, as it is pretty much the same as the Kirby Starter Kit. The page works, including subpages.

Since the website runs in a sub-subfolder, I changed set RewriteBase /folder1/folder2. Besides of that, the htaccess is pretty much the same as the Kirby original.

But: I cannot access the panel folder, a 502 occurs.

Php-info says, that all requirements for Kirby are met (Apache 2, PHP 5.5, and yes: mbstring is enabled, I think)

Did anyone have this problem before? Is there anything I can do? Does this may depend on file permissions?
Best thanks in advance

Are you redirected anywhere?

No, there is only the standard error prompt:

502 Bad Gateway
The server returned an invalid or incomplete response.

And that happens as soon as you enter and you are not redirected to or installation(if the Panel hasn’t been installed yet) as you should be? Have you already created a user?

Ok, when I delete all cookies, the panel works and redirects me to the login page. When I log on, the 502 appears. Can be repeated. (Yes, panel installed and user created on the old server.)

When I look at the two kirby session cookies, it says
Path: /

But my site is at

Could this cause the problem?

And by the way, the two kirby session cookies could be hijacked by the parent website, right?

Could you try and set the URL manually in your config.php:

c::set('url', '');

BTW: If you are concerned about security, the first thing to do would be to upgrade to a more recent PHP version:

Hi, unfortunately this doesn’t change anything. I had it before, but switching it on and off doesn’t make a difference.
The cookies are still being set for the domain’s root directory ‘/’ .
Not sure though if that even causes the problem or some other thing.

Hm, running out of ideas. Guess it has to do with the nesting, maybe some other rewrite rules from upper levels interfering?

  • Does it work if you set a Domain to that subfolder?
  • Have you tried with a fresh starterkit?

Ok, got it. Turned to my Sysadmin and we checked the Apache console. The error occurred due to low output_buffering which caused a “zend_mm_heap corrupted” prompt. Increased it to 8192 and it works!

Thanks for the assistance!