RPi lighttpd and Blundit admin 404 error

Post Reply
vela025
Jr. Bludit
Posts: 3
Joined: Thu Dec 17, 2020 4:18 pm

Hi all,

I've been trying for a few evenings to get blundit to work on my webserver. However I've tried a few different methods but non seems to quite work out for me.

I'm using a raspberry pi 3, debian (buster), php, and lighttpd (with mod_rewrite). I setup lighttpd using this guide https://pimylifeup.com/raspberry-pi-lighttpd/

I've also added the below to the lighttpd.conf file as described here: https://gitter.im/dignajar/bludit/archives/2016/01/08

Code: Select all

url.rewrite-if-not-file = ( "^/bludit/(.*)" => "/bludit/index.php?q=$1" )
I was unsure on the arrangement so left it as a single line of syntax.

Using the rpi script https://docs.bludit.com/en/how-to/easy- ... pi-install seems to run ok, but when I go to the page (for me server.local) it instead shows excerpts of php as if there is a } or ) missing from the script. I've tried finding where the }) is missing and putting it back but this results in a blank page being displayed.

Having removed apache2 and put lighttpd back, I've downloaded the release from bludit and put the contents in /var/www/html/ adjusting permissions to 777. This runs the install, but then gives 404 errors for anything other than the index page /admin and /about show 404 errors.

Finally I've been using the php built-in web server which works no problems, however is only accessible locally, if I change the settings in admin to port 80 they change back to 8000. If I copy the Bludit folder that the php web server downloads from git to /var/www/html/ I also get the 404 errors and due to this cannot edit the web address in the admin page, as I cannot access the admin page. Editing the site.php file to site.local also results in 404 error on any page other than index.

Any advice would be welcomed, I would very much like to use bludit as it seems fairly lightweight and clean in comparison to other CMS I've used.

Thanks!
bozodev
Ssr. Bludit
Posts: 23
Joined: Sun May 12, 2019 1:03 am

I am not sure exactly what is going on with your setup. I have not tried lighttpd before.

However, if you just want to get Bludit running on a Raspberry Pi you might be interested in this script that I setup.

https://github.com/mhancoc7/Bludit-Pi

If you really want to make it simple you can just use this line.

Code: Select all

curl -sSL https://pilab.dev/install-bluditpi | bash
This basically pulls down the script and runs it. The code is open source and you are free to insect it before running which is always a good idea.

If you decide to give this a try I would highly recommend that you start with a fresh install of Raspbian on the Pi.

Hope this helps.

Jereme
Checkout Pi Lab (Powered by Bludit PRO & Raspberry Pi) - Bludit Backer
vela025
Jr. Bludit
Posts: 3
Joined: Thu Dec 17, 2020 4:18 pm

bozodev wrote: Thu Dec 17, 2020 6:26 pm I am not sure exactly what is going on with your setup. I have not tried lighttpd before.

However, if you just want to get Bludit running on a Raspberry Pi you might be interested in this script that I setup.
Hi Jeremy,

Thanks for your reply, can you confirm that script is different to the one I have already tried, that I have linked to in my original post as that too is also called Bludit-pi by Pi-Lab and resulted in a page that displayed excerpts of php script from the index.php file?

I've removed and purged php, apache2 and lighttpd and re-ran your script. When I navigate to sever.local I get a page that displays:

Code: Select all

Install Bludit first.'); } // Load time init $loadTime = microtime(true); // Security constant define('BLUDIT', true); // Directory separator define('DS', DIRECTORY_SEPARATOR); // PHP paths for init define('PATH_ROOT', __DIR__.DS); define('PATH_BOOT', PATH_ROOT.'bl-kernel'.DS.'boot'.DS); // Init require(PATH_BOOT.'init.php'); // Admin area if ($url->whereAmI()==='admin') { require(PATH_BOOT.'admin.php'); } // Site else { require(PATH_BOOT.'site.php'); } 
bozodev
Ssr. Bludit
Posts: 23
Joined: Sun May 12, 2019 1:03 am

vela025 wrote: Thu Dec 17, 2020 7:04 pm
bozodev wrote: Thu Dec 17, 2020 6:26 pm I am not sure exactly what is going on with your setup. I have not tried lighttpd before.

However, if you just want to get Bludit running on a Raspberry Pi you might be interested in this script that I setup.
Hi Jeremy,

Thanks for your reply, can you confirm that script is different to the one I have already tried, that I have linked to in my original post as that too is also called Bludit-pi by Pi-Lab and resulted in a page that displayed excerpts of php script from the index.php file?

I've removed and purged php, apache2 and lighttpd and re-ran your script. When I navigate to sever.local I get a page that displays:

Code: Select all

Install Bludit first.'); } // Load time init $loadTime = microtime(true); // Security constant define('BLUDIT', true); // Directory separator define('DS', DIRECTORY_SEPARATOR); // PHP paths for init define('PATH_ROOT', __DIR__.DS); define('PATH_BOOT', PATH_ROOT.'bl-kernel'.DS.'boot'.DS); // Init require(PATH_BOOT.'init.php'); // Admin area if ($url->whereAmI()==='admin') { require(PATH_BOOT.'admin.php'); } // Site else { require(PATH_BOOT.'site.php'); } 
Yes that's the same one. I will test it out again tonight to be sure there isn't an issue with it.
Checkout Pi Lab (Powered by Bludit PRO & Raspberry Pi) - Bludit Backer
bozodev
Ssr. Bludit
Posts: 23
Joined: Sun May 12, 2019 1:03 am

I just tested the script and it worked flawlessly. Are you using it on a fresh install of Raspbian?
Checkout Pi Lab (Powered by Bludit PRO & Raspberry Pi) - Bludit Backer
Post Reply