Panel is not displayed on a live server

Hi! I’ve uploaded finished on local version website to the live sever and run into problem: the website is displayed and subpages as well but when I try to go to panel it just shows blank page. I’ve tried several solutions from the forum but no luck. Either error 500 or blank page. domain runs from the server suborder but directed directly to it (I’ve tried to add RewriteBase /myfolder but it gives me error in this case).

Also when browsing pages - images are loaded only are page manual refresh. eg you go to page and see only image icon although all links are pointing to files generated by kirby, when refresh page images are loaded. (link: https://konstafed.com) - why it loads this way? I had the same issue on local version.

How to get access to the panel on the live server?

Hosting provider is IONOS.it
php version for domain: 8.0
Kirby: 3.6

htaccess file:

# Kirby .htaccess
# revision 2020-06-15

# rewrite rules
<IfModule mod_rewrite.c>

# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on

# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder;
# otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite,
# set the RewriteBase to:
#
# RewriteBase /mysite

# In some environments it's necessary to
# set the RewriteBase to:
#
RewriteBase /

# block files and folders beginning with a dot, such as .git
# except for the .well-known folder, which is used for Let's Encrypt and security.txt
RewriteRule (^|/)\.(?!well-known\/) index.php [L]

# block all files in the content folder from being accessed directly
RewriteRule ^content/(.*) index.php [L]

# block all files in the site folder from being accessed directly
RewriteRule ^site/(.*) index.php [L]

# block direct access to Kirby and the Panel sources
RewriteRule ^kirby/(.*) index.php [L]

# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]

</IfModule>

# pass the Authorization header to PHP
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

# compress text file responses
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>



RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
Header always set Content-Security-Policy "upgrade-insecure-requests;"

AddType video/mp4 .mp4

Those rewrite rules should go inside the

<IfModule mod_rewrite.c>

After RewriteEngine on and before the other rewrite rules.

Thank you! Changed, but no luck still just an empty page.

# Kirby .htaccess

# revision 2020-06-15

# rewrite rules

<IfModule mod_rewrite.c>

# enable awesome urls. i.e.:

# http://yourdomain.com/about-us/team

RewriteEngine on

RewriteCond %{HTTPS} !=on

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

# make sure to set the RewriteBase correctly

# if you are running the site in a subfolder;

# otherwise links or the entire site will break.

#

# If your homepage is http://yourdomain.com/mysite,

# set the RewriteBase to:

#

# RewriteBase /mysite

# In some environments it's necessary to

# set the RewriteBase to:

#

RewriteBase /

# block files and folders beginning with a dot, such as .git

# except for the .well-known folder, which is used for Let's Encrypt and security.txt

RewriteRule (^|/)\.(?!well-known\/) index.php [L]

# block all files in the content folder from being accessed directly

RewriteRule ^content/(.*) index.php [L]

# block all files in the site folder from being accessed directly

RewriteRule ^site/(.*) index.php [L]

# block direct access to Kirby and the Panel sources

RewriteRule ^kirby/(.*) index.php [L]

# make site links work

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*) index.php [L]

</IfModule>

# pass the Authorization header to PHP

SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

# compress text file responses

<IfModule mod_deflate.c>

AddOutputFilterByType DEFLATE text/plain

AddOutputFilterByType DEFLATE text/html

AddOutputFilterByType DEFLATE text/css

AddOutputFilterByType DEFLATE text/javascript

AddOutputFilterByType DEFLATE application/json

AddOutputFilterByType DEFLATE application/javascript

AddOutputFilterByType DEFLATE application/x-javascript

</IfModule>

AddType video/mp4 .mp4

Do you have access to the server and php error logs?

Is there any error in your browser console?

I’m not sure if I have access to server logs… it is basic shared hosting plan on linux server from IONOS (at least this is in description, I honestly do know where to look for the log files).

Browser console doesn’t give any errors

Were all files properly uploaded to the server?

Is there no logs folder in your doc root?

If there are no php error logs, you can create a php.ini file in your webspace with the following content (example path, replace with home folder of your webspace):

error_reporting = E_ALL | E_STRICT;
log_errors = On;
display_errors = Off;
error_log = /homepages/27/d382162338/htdocs/php-errors.log;

Thank you! I’ve added the file and changed path to the absolute path like they said in instruction to point to my webspace. So far there is no php-errors file. I have only these files:

Edit: placed php.ini in the root directory of my webspace, tried to place php.ini in the website directory - it breaks the website. No log files created

Are you using any (Panel) plugins? I just tried to upload a Kirby 3.6.1.1 website to IONOS shared hosting without any issues (can’t test with SSL though).

Have you removed that CSP header from your .htaccess?

Could you test and upload a fresh Starterkit to a separate folder (and assign some subdomain to it).

I started troubleshooting with removing all plugins. I have only one preview plugin now for the iframe display in layout editor. Removed even this one…

Have you removed that CSP header from your .htaccess ?
If you are talking about this lines:

RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]

I’ve tried - doesn’t change anything. I moved those directly under “RewriteEngine on”

Got this error with subdomain and starter kit:

The panel cannot be installed

  • The panel installer is disabled on public servers by default. Please run the installer on a local machine or enable it with the panel.install option.

Yes, for a first installation, you have to add 'panel.install' => true below the debug statement in your config.php:

return [
    'debug' => true,
    'panel.install' => true,
];

This is the line I meant, is that still present?

No this line removed, should it be there?
Panel installed for the subdomain.

So the problem in the config file?

I have it like this now for the main website:

 <?php 
return [
  'debug' => true,
  'panel.install' => true,
  // … your other settings
   'routes' => [
    [
      'pattern' => 'sitemap.xml',
      'action'  => function() {
          $pages = site()->pages()->index();

          // fetch the pages to ignore from the config settings,
          // if nothing is set, we ignore the error page
          $ignore = kirby()->option('sitemap.ignore', ['error']);

          $content = snippet('sitemap', compact('pages', 'ignore'), true);

          // return response with correct header type
          return new Kirby\Cms\Response($content, 'application/xml');
      }
    ],
    [
      'pattern' => 'sitemap',
      'action'  => function() {
        return go('sitemap.xml', 301);
      }
    ]
  ],
  'sitemap.ignore' => ['error'],
];

No, just wanted to make sure it was removed.

I only posted the config example for the fresh Starterkit I wanted you to install. So the panel.install stuff should go into the Starterkit you uploaded, not into your main website, so that you can create the first user.

Understood. The plain starter kit works. What could be the solution besides redo everything from scratch on the live server? The finished website runs panel without problem on local machine…

What if you remove these https rewrite rules?

No effect. Will try to run plain kit on the subdomain now, create new user and add content there

Getting the same error with plain kit on the subdomain. And I started my website with plain kit…

Which error?

Panel not displayed, it just plain kit there now.

I’m a bit confused. So a fresh Starterkit Panel works, but not a Plainkit?