I downloaded the starter kit, created a local git repo, and deployed to a test server. In my browser I can see the demo website fine. All is well until I go to install the panel. On mywebsite.com/panel all I get is a 404 Not Found. I can verify that the directory exists and has the right files in it.
My panel folder is in the same directory level as the site’s index.php file.
Here’s my .htaccess file
# Kirby .htaccess
# 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
# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ error [R=301,L]
# block all files in the site folder from being accessed directly
RewriteRule ^site/(.*) error [R=301,L]
# block all files in the kirby folder from being accessed directly
RewriteRule ^kirby/(.*) error [R=301,L]
# make panel links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^panel/(.*) panel/index.php [L]
# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
</IfModule>
# Additional recommended values
# Remove comments for those you want to use.
#
# AddDefaultCharset UTF-8
#
# php_flag short_open_tag on
That definitely sounds like an .htaccess problem. Like your .htaccess is being ignored. Although you still should be able to get to the panel if that was the case. Just to rule it out though, do you have access to this server’s configuration, and if so, are any other sites properly paying attention to .htaccess? If Apache was never configured, you may need to add or modify a line in its default site configuration. (Particularly, you’ll need an AllowOverride All in the Directory section of the Apache site config file.)
It’s also possible that mod_rewrite isn’t installed either. Derps. I hate Apache debugging, hopefully that’s not the problem.
I just had this problem on my site. I had mod_rewrite enabled, but the Apache site config had AllowOverride to None, preventing the .htaccess file from overriding anything. I changed that to FileInfo and it started working.
I’m having this same issue. Running kirby locally from my sites folder on a mac. /panel takes me to a 404 Not Found page. The .htaccesss file is there and I’ve tried uncommenting RewriteBase. Nothing is working. Please help!
I have tried all the suggestions above except for the mod_rewrite stuff - not even sure how to change that. None of the subpages work either. I’m not using MAMP, I’m doing everything from my Macintosh HD/Users/Username/Sites folder. All previous sites I’ve built work fine locally this way, but they were all hard coded and not using a cms.
Thank you for responding! Any help you can offer is greatly appreciated!
I can’t find any file on my computer named httpd.conf. I don’t see a /etc/apache2 file path either. The closest thing I can find is usr/include/apache2. Am I missing something?
Just found out there is a reply limit for new members… So I’ll just have to edit this post. I was able to get it to work on my live hosted site: http://catsandcocktailsbar.com/kirby/ Still not sure why I can’t get it working locally. For the live version, I just left the .htaccess file at it’s original state and it somehow works fine. I’d still prefer to keep working locally while I build my site, but I’ll give this a try for now.
Any further help you’re willing to give is always appreciated. Thank you for your help and patience, Sonja!
Update 01: @texnixe I can’t /etc/apache2 anywhere. I went digging through folders and did searches for file names, the text “LoadModule”, etc. Couldn’t find anything fitting your description.
Update 02: @texnixe I found the httpd.conf file. Still learning how to navigate the hidden folders on a mac and how to work with Terminal. I uncommented LoadModule rewrite_module lib exec/apache2/mod_rewrite.so and I’m still having the same issue. I could try using mamp - I quit using it for some reason. I forget why now, but i remember being frustrated with it for some reason.
Update 03: @texnixe I installed MAMP and the everything seems to work fine locally! Still wish I could figure out why it wouldn’t work from my sites folder. But, I am able to work locally now! Thank you!
I was having the same problem with my Wamp install. I had to uncomment “LoadModule rewrite_module modules/mod_rewrite.so” in my httpd.conf file located in: wamp > bin > apache > apache2.4.9 > conf
I also had to restart Wamp for the change to work.
I’ll add another solution to the pile. /panel was redirecting to Kirby’s error page, and the problem was with file permissions.
I made sure all the files and folders had proper permissions and the problem went away. I find that this solution also fixes 500 errors in some shared hosting environments.
# Loop through all files recursively and change permissions to 644
find starterkit/ -type f -exec chmod 644 {} \;
# Loop through all folders recursively and change permissions to 755
find starterkit/ -type d -exec chmod 755 {} \;