Can't log in via the Kirby panel

Hi,

I uploaded my site to a shared hosting account but I can’t login. I made sure that his is in the config file:

<?php
return [
  // Debugging
  'debug' => false,
  'panel' =>[
    'install' => true
  ]
];

I have PHP 8.1 installed.

Hi, do you get an error-message from kirby?

Is your kirby in a subfolder or in root?
e.g. yourdomain.com/yourkirby/ or yourdomain.com/

In the .htaccess file you have options for both methods.
Perhaps it helpes to set the right one:

# 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 /

Classic reason for the problem could also be that you didn’t copy the .htaccess file over to your webspace.

1 Like

Hi,

I’m getting invalid login as a message. I don’t know how to reset the password. The .htaccess file has been uploaded and contains the following:

# Kirby .htaccess
# revision 2022-09-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>

I’ve copied all the files from my computer to the to folder of my subdomain. I’m attaching a screenshot of the folder structure on the server side. All the site’s files live inside the entwickler folder of the subdomain.

Ok, I was able to figure it out by changing the login credentials in the index.php and the .htpasswd files which are located inside the accounts folder. Thanks for your help!

1 Like

Hi there,

I’m having trouble again logging into the Kirby panel. I changed the email in both .htpasswd files and the index.php file uploaded these along with the .htaccess file which contains the following:

# Kirby .htaccess
# revision 2022-09-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>

Screenshot_20230917_150247

Grateful for your input.

?? The .htpasswd file doesn’t contain an email

no, it doesn’t contain an email. In fact, it didn’t contain an email even for the previous site which was working and where I could login. Both .htpasswd files contain only this: mysecurepassword@helloworld

both index.php files contain this:

<?php

return [
    'email' => 'me@myemail.com',
    'language' => 'en',
    'name' => '',
    'role' => 'admin'
];

Can I put it like this in the .htpasswd?

mysecurepassword@helloworld
 me@myemail.com

No, the password needs to be encoded

Can you please explain to me more? How can I accomplish this?

Change the password via the Panel, not manually.

I can’t login. This is the problem

Then remove all accounts and create them new

1 Like

How can I remove the accounts if I can’t login?

Via the file system

Or use the password reset feature

1 Like

Ok, it worked now. Thank you for your support.

I only kept the .logins and the index.html files inside the accounts folder and deleted the rest. Thought I’d share this.