Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Grav Skeleton Blog empty page on apache

Started by Muut Archive 11 years ago · 15 replies · 899 views
11 years ago

Hey guys. I love the look of grav but I cannot figure out how to make it work on apache. I set the permissions to 777 (chmod 777 /var/www/blog) but still a blank page. Any suggestions?

11 years ago

A blank white page almost always means a PHP error. You should look at your php error logs or turn on displaying of PHP errors. This will tell you what the issue is and get you on your way to resolving the problem.

11 years ago

Okay. I am not exactly experienced at this, but how do I view php logs :o

11 years ago

None of that makes sense to me. I am actually using a Raspberry Pi, running Raspbian (debian), also I was using dropplets before and it worked fine, except a few things like it couldn't save fully.

11 years ago

If your running PHP, you usually have a php.ini file that controls all aspects of PHP's configuration. Not sure of the location in Raspbian, but an easy way to tell is to create a simple php file called info.php:

TXT
<? phpinfo();

Then point your browser at this file, it will give you all kinds of information including the location of the php.ini file.

10 years ago

Funnily enough, the above info.php file contents render as blank for me, but the following works:

--- php
<?php
phpinfo();
?>

TXT

I guess the errors causing the blank page syndrome are myriad, but fwiw setting permissions like below fixed Grav for me (I was getting error 500):

sudo chown -R www-data:www-data /var/www
sudo chmod -R 775 /var/www

10 years ago

If the above phpinfo() is blank, you might be having the PHP.ini setting short_open_tag turned off?

10 years ago

That's most likely it :) Thanks! I did think the difference seemed a tad big to be just different PHP versions.

Best,
PHP Noob

10 years ago

@janne not sure what platform you are doing this on, but I strongly recommend PHP7 it's approx 2X faster than PHP 5.X. Also you will have less permissions problems if you can run the webserver under the same account that owns the page files. That way you can edit the page files as you need and never have to worry about the web server creating cache files or configs that have different perms.

We have some extensive writeups in the docs about different hosting platforms that outline some of these techniques.

10 years ago

Nice, thanks! I'm currently doing some testing on Digital Ocean and simply used one of their ready-made droplet images. I need to run Wordpress on the same droplet so I need to make sure that works as well, whatever I decide to upgrade.

None of this stuff will get particularly heavily hit but 2x faster rendering obviously sounds tempting :)

10 years ago

Actually.... an even better approach that I strongly recommend is using ServerPilot.io

I blogged about this with Amazon EC2, but if you do the first steps of the DigitalOcean guide to setup an Ubuntu 14.04 base install, then pickup with the ServerPilot stuff from the blog post, it will work fine:

https://getgrav.org/blog/fast-free-grav-development

PS, this is how we run getgrav.org, only on linode. But ServerPilot gives us HTTP/2 and PHP7 without any fuss!

10 years ago

That's great, I have to check all that out — thanks a lot! To be honest getting Grav to work has been the easiest & quickest part of this little project. Very designer friendly, all in all!

Next on my list will be embedding forums and commenting :)

10 years ago

I have a hunch you want to embed Muut :), and it couldn't be easier. For example this very page is simply:

HTML
- - -
title: Forum
process:
    markdown: false
- - -
<a class="muut" href="https://muut.com/i/getgrav">Grav Forum</a>
<script src="//cdn.muut.com/1/moot.min.js?nocdn"></script>

NOTE: dashes in frontmatter have spaces added so as not to confuse muut's code blocks.

The ?nocdn is only required because we are using Grav's CDN plugin that tries to CDNify script URLs.

10 years ago

Tried Serverpilot and while I'm happy to have learned how to set stuff up manually, I think I'll go ahead and delete my old server and continue using Serverpilot from now on. Awesome! Thanks a lot for the recommendation.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1360 9 years ago
Archive · by Muut Archive, 9 years ago
2 938 9 years ago
Archive · by Muut Archive, 9 years ago
2 4068 9 years ago
Archive · by Muut Archive, 9 years ago
1 2958 9 years ago
Archive · by Muut Archive, 9 years ago
3 1122 9 years ago