How to setup kirby on subdomain?

I uploaded kirby to test.example.com
I didn’t tweak or setup anything
I included .htaccess as per docs
Home page works, but subfolders return internal server error, and some times kirby error page
So I can’t access panel

Does subdomain require any special setup?
I asked my hosting provider and they said I have mod_rewrite activated, so not sure what’s wrong

Have you checked if the .htacces file was uploaded to the server?

You might have to set the rewrite base as well in your .htaccess.

  1. Done
  2. Done

Same problem.

Docs mention “content folder must exist and be writable”.
What permissions are recommended? I have these:

/content: 755
/thumbs: 755
/site/accounts: 755

Is that ok?

Permissions shouldn’t be the cause of your issue.

A Internal Server Error message generated by Apache means most likely that the RewriteBase is not correct. If you get an empty page with HTTP 500, it’s a different issue.

Which hosting provider are you at?

I’m on eleven2.com shared hosting
I get all 3 randomly:

  • kirby error page
  • internal server error
  • empty page 500

That’s very strange. Randomly getting different errors is not normal. Maybe you still have some responses in your browser cache?

Very confused :sweat:

  • I just uploaded kirby to an unused TLD, same error. Maybe it’s not related to subdomain.
  • I consulted hosting provider and they are “investigating”
  • Also /content, /thumbs, and site/accounts exist and are writable
  • I manually created /test/index.html, and /test/index.php, with a “hello world”, and they render HTML and PHP content accordingly
  • I manually created kirby content page /content/about/about.txt, and kirby renders the page as expected
  • Also everything works normally on localhost:9000.

Apparently only panel fails on server, whether is subdomain, or root domain.

:’(

How does the Panel fail? Do you get any error message on the page or in your browser’s JavaScript console?

I get:

  • kirby standard error page
  • internal server error
  • empty page 500

Console throws:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Also Found this on error_log file:

[18-Dec-2015 16:19:47 UTC] PHP Parse error: syntax error, unexpected '[' in /public_html/kirby/toolkit/lib/f.php on line 547

Sometimes I just get a blank page with no HTML at all (I checked source with alt+cmd+u)

So freaking weird, right? :frowning:

In your first post you said, subfolders fail as well, so it seems that has been resolved in the meantime? What have you changed so that it works now?

I was wrong. Actually is only panel fails.
And still fails.

Content pages seems to work fine, (though I’m testing plainkit, so theres not a whole lot to check).
I manually created /content/about/about.txt to test that. It worked.

Still don’t know what’s wrong with panel.
Waiting for hosting provider to confirm server health.

This looks like it’s not the right PHP version, what version have you enabled? You need PHP 5.4+

Jup, that seems to be the issue. Please be aware that PHP 5.4 is the absolute minimum. PHP 7 is preferred and if that’s not available, PHP 5.6 or 5.5.

Resolved:

Hosting provider confirmed I have mixed versions of PHP among roots and subdomains :rage:
I didn’t know that was actually a thing BTW.
That led me to take requirements for granted :expressionless:
I’m not much of a sys admin so it got me tricked easily.

That’s why it worked on other sites before, but not this time.
I had to ask for upgrade. Not sure if I have to do that every time (?)

My fault. Sorry about the confusion :flushed:
I’ll sort it with the hosting provider.

Depending on your hosting provider, you can indeed set different php versions on a per domain basis. Again, depending on what your provider offers, you can usually choose between different versions in your admin panel.

No problem at all. Great that it works now.

Thank you very much @texnixe and @lukasbestle
You nailed it! :sunglasses: