Following starterkit-master instructions; stuck at no Panel -- please help

Hi.

Following
https://www.rosehosting.com/blog/how-to-install-kirby-cms-on-ubuntu-18-04/

(only I’m doing everything on my local Ubuntu 18.04 desktop)

I did everything (blindly) through “You should be able to see the PHP default test page.”, and everything seems fine (I recognize the PHPinfo page)! Yay! and it’s
PHP Version 7.2.18-1+ubuntu18.04.1+deb.sury.org+1

The next thing they say to do is get the current Kirby (production) installation files form Git, and I want to use the demo/test version instead, so I’m trying to simply unzip that and copy the files to the “web server root” which (I confirmed) is /var/www/html.

So I copied everything from where I unzipped the starterkit-master.zip which I downloaded today at

root@beaver:/var/www/html# cp -rT /home/jim/Downloads/starterkit-master /var/www/html/

which clearly worked, because I see all the files and directories at that level (and spot-check many subdirectory places OK) including .htaccess and 2 other hidden files, and when I point Chromium at

localhost/index.php I get the page “Maegazine | Error”:

Error
Well, stuff can go wrong sometimes …
and the link to https://instagram.com/getkirby works.

So I go back to the instructions at

and I try

http://localhost/panel

and get a 404 error.

What should I do to complete the installation/startup?

Thanks for any help, and I’m sorry if i missed something in the instructions.

Jim

Welcome to the forum! :wave:

You can leave out the /index.php from the URL. The reason why you are getting the error message is that Kirby then tries to find a page called index.php, which does not exist. Instead you can access the homepage at http://localhost/ directly.

That you get a 404 error when accessing the Panel means that the rewrite rules are not set up correctly.

The tutorial you linked to uses /var/www/html/kirby/ as the DocumentRoot. You are however using /var/www/html directly (which is fine too!). Have you modified all paths inside the Apache configuration to match the new path?

Thanks for your reply, Lucas!

However, I’m still in the dark.

When I browse to simply localhost without any file specification, which is what I think you meant, I get the Apache2 Ubuntu Default Page, which of course comes from /var/www/html/index.html; I don’t get a 404 error there.

I had to find somebody else’s instructions for installing Apache2 and PHP etc., required for Kirby to work, so that is why I searched for them and found the tutorial I then followed. If there is a problem with that, then someone should probably put all of the necessary installation instructions on the Kirby WWW site, don’t you agree?

Anyway, I didn’t change the “web root” or DocumentRoot; there is no mention of that in that tutorial; it’s really very straightforward.

When I browse to localhost/info.php, I get the (presumably correct) usual PHP info page for PHP 7.2. That info.php is in the same directory (“web root”) as the index.php from starterkit.

Also, in fact, index.php does exist, and clearly is there because I copied it to there from /home/jim/Downloads/starterkit-master, and it contains only 3 lines:

<?php

require __DIR__ . '/kirby/bootstrap.php';

echo (new Kirby)->render();

(It seems odd to me that it just ends this way.)

but anyway, that is not the reason for the 404 error.

Re your advice:

“The tutorial you linked to uses /var/www/html/kirby/ as the DocumentRoot . You are however using /var/www/html directly (which is fine too!). Have you modified all paths inside the Apache configuration to match the new path?”

I don’t understand what you are saying. I am simply trying to follow the “Starterkit” instructions and there is nothing there about DocumentRoot etc.; it simply says “copy [the files in starterkit] to the web root” and proceeds from there to “Create your first account” which is where I get my first 404 error.

Does this info help you determine what is really the problem?

Thanks for trying to help; I apparently really need help, and I appreciate anyone’s efforts to clear up this issue.

Jim
(Lost in St. Paul)

I don’t know why the Reply editor took out all my “new paragraph” formatting starting halfway through that post.

Also, it seems to me that index.php must exist and in fact get executed, because, as I said originally, it does present the page “Maegazine | Error” with links at the bottom, one of which actually works and goes to https://www.instagram.com/getkirby/.

Does this help?

Yes, that file is perfectly alright with those 3 lines. But since you have an index.html file in the same folder, that one takes precedence over the index.php file. You can either remove/rename the index.html file or set the index.php as the default file in your Apache configuration.

In httpd.conf

DirectoryIndex index.php

After making those changes, you should at least see the start page of the Starterkit if you call http://localhost (and not http://localhost/index.php) in the browser.

If you still can’t access the Panel or subpages:
Make sure that your Apache installation is configured to allow .htaccess files. If it isn’t, you’ll have to modify the setting in the httpd.conf as well.

You can test if the server picks up the file this by adding some nonsense into your .htaccess. If your site can no longer be accessed, the file is at least read.

Thanks, Texnixe.

I’m making progress now, using your suggestions.

I have learned that in Apache version 2, httpd.conf has been deprecated and the new file location is /etc/apache2/apache2.conf, which I know how to edit.

However, I don’t know what to change in /etc/apache2/apache2.conf in order to do what you said, “Make sure that your Apache installation is configured to allow .htaccess files.”

I did test as you suggested and added some junk text as a second line in the .htaccess file in /var/www/html, which is a copy of the one supplied in starterkit-master, and I stopped and started Apache, and on browsing to localhost I see no errors, so apparently in fact it is not being read.

However, now I don’t get the Error in Maegazine, but all of the pictures are just solid black and clicking one (they are apparently links) does nothing.

Please tell me specifically what changes to make in apache2.conf.

Thanks again.

Ok, one step further, the start page works but the images and probably subpages don’t which is probably due to the fact that the htaccess file is ignored.

The directive for allowing htaccess overrides is like this (adapt the directory to your structure, /var/www/html)

<Directory /var/www/>
    AllowOverride All
</Directory>

Just on a side note: There are other options for local development environments than setting up Apache/PHP on your machine manually.

Thanks!

Wow, getting close! :^)

In /etc/apache2/apache2.conf, specifically where/what do I add/change as you say,

<Directory /var/www/html>
    AllowOverride All
</Directory>

In other words, in what section, or what string do I search for in order to get to the right place?

Thanks again!

Well, you add this to these <Directory> settings in the config file, I assume there are already some settings.

I found 5 blocks that look alike except for the directory they refer to, and I changed

<Directory /var/www>
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
</Directory>

to

<Directory /var/www/html>
	Options Indexes FollowSymLinks
	AllowOverride All
	Require all granted
</Directory>

and I added

 <Directory /var/www/html>
    	Options Indexes FollowSymLinks
    	AllowOverride All
    	Require all granted
 </Directory>

and re-started Apache, then I got 500 Internal Server Error.

Then I removed the junk text second line in .htaccess and the 500 goes away; then I’m back to black rectangles.

Then I tried removing “Require all granted” from both of those blocks and now I get 403 Forbidden You don’t have permission to access / on this server, and I’m out of ideas, if removing the block about /var/www doesn’t fix it.

I don’t think it’s a good idea to change the path of an existing entry. I’d first try with just setting AllowOverride none in the first directive above to AllowOverride All without changing the path. If that doesn’t help, you can add a new one with the html path.

I’ve now tried all of those options, and the closest I get to what we expect is the black rectangles, and no errors, on the Maegazine page, but clicking on any black rectangle gets only a 404.

html/content does have 1_photography with obvious content.

Can you readily tell me the use of “Require all granted”?

or can you send me a block like

<Directory /var/www/html>
	Options Indexes FollowSymLinks
	AllowOverride All
	Require all granted
</Directory>

that is known to work?

Thanks for all your help.

I bet it’s close to your quitting time; maybe you want to come back to this tomorrow?

I’ll get up early here in Minnesota USA and check the forum and my email.

Meanwhile, I’ll take your other suggestion and try an “other option for [local development environments]”.

I despise Windows in general but I have a Win 10 workstation I can load WAMP on (I’ve used WAMP before, and it worked) and try the starterkit-master there.

I still say this should be easier, including that setting up the starterkit-master on a current Ubuntu workstation, a very common environment for those persons wanting to learn about Kirby, should be made more complete/clear.

Regards,

Jim

I’m not really into that server stuff but usually you just have to set this with the right path. Wondering if you are using the right config file, but you said changing it caused an error so it seems to have an effect, after all. Also, in a real world example you would have to set up a virtual host for each project instead of fiddling with the main config file.

Your life would be a lot easier if you just set up some development environment instead of messing with this server stuff if you have absolutely no experience with that.

Hm, a working server is really a prerequisite, no matter if you use Kirby or any other CMS. If we started documenting server installation instructions for each type of server and OS, there would be no end to it.

XAMPP is available for Linux as well, so no need to use Windows.

I’d also recommend XAMPP. Internally it does just the same as a custom Apache/PHP setup, but it’s already preconfigured to work with most CMS including Kirby.

I personally have a custom setup and I know that setting one up can be pretty fiddly – especially without much or any prior experience. And it’s even more difficult to provide support for that as we’d need to know every little configuration detail in your local setup, which is hard to get across on the forum as you’ve seen.

If you haven’t yet tried XAMPP, I encourage you to do so. They have installation instructions for Linux here. Please make sure to uninstall or at least disable your custom server setup before installing XAMPP as those two setups will otherwise conflict.

Thanks, I think you both have given good advice, and I agree that you can’t document installation for every possible environment. I was only recommending that you might do that for the half-dozen or so most popular production platforms, and at least one of those would probably have to be a flavor of Debian.

I don’t have much time left before I need to make a presentation to the board of directors for my recommended CMS solution, so I think I will try WAMP next and get some screenshots etc… There certainly is an advantage of always being logged in as the owner of everything. :grin: