Questions regarding Lighttpd

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
rhkean@gmail.com

Questions regarding Lighttpd

Post by rhkean@gmail.com »

@Fourdee

Your write up on Lighttpd (here: http://dietpi.com/phpbb/viewtopic.php?f ... 1335#p1335 ) states, "Recommended for advanced users only" due to the incompatibility with the other web-based software that is included with your dietpi distro....

by incompatibility, I'm assuming that you just mean that you haven't automated the other products to use the Lighttpd stack if selected. Is that correct?

Also, is there a quick list of which other apps will trigger a Webserver Stack to be installed?
personally, I'm interested in whether LinuxDash, PhpSysInfo, or phpMyAdmin are coded to trigger a webstack install?

I'm also curious if phpMyAdmin works with MariaDB? It's my understanding that MariaDB is supposed to be a drop-in replacement for MySql, but I haven't experimented with it yet.


P.S. I noticed that there isn't a v109 posting in the Version History section.

thanks,
rob
Zombievirus
Posts: 119
Joined: Sun Sep 20, 2015 2:07 am

Re: Questions regarding Lighttpd

Post by Zombievirus »

Yup!

A few automated installations automatically install the LASP Stack.

In your Case:

LinuxDash installs LASP
PHPSysInfo installs LASP
phpMyAdmin doesn't install any Stack but it requires MySQL to be preinstalled!

Maybe FourDee can do some Code Magic and instead of automatically installing LASP Stack, ask for what Stack should be installed while installing LinuxDash or PHPSysInfo or any other Package that automatically installs LASP Stack.

DietPiCam is the only piece of software where Apache or Nginx should be enforced...
rhkean@gmail.com

Re: Questions regarding Lighttpd

Post by rhkean@gmail.com »

thanks for the info....

you just saved me a couple re-imaging reboots and/or code combing tonight.... :D

instead, I'll test phpMyAdmin with MariaDB. I've got to test if MySql gets installed automatically when you select phpMyAdmin, or if it just fails. I should also do some googling to see if MariaDB truly is a drop-in replacement.

thanks
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: Questions regarding Lighttpd

Post by Fourdee »

rhkean@gmail.com wrote:@Fourdee

Your write up on Lighttpd (here: http://dietpi.com/phpbb/viewtopic.php?f ... 1335#p1335 ) states, "Recommended for advanced users only" due to the incompatibility with the other web-based software that is included with your dietpi distro....

by incompatibility, I'm assuming that you just mean that you haven't automated the other products to use the Lighttpd stack if selected. Is that correct?

Also, is there a quick list of which other apps will trigger a Webserver Stack to be installed?
personally, I'm interested in whether LinuxDash, PhpSysInfo, or phpMyAdmin are coded to trigger a webstack install?

I'm also curious if phpMyAdmin works with MariaDB? It's my understanding that MariaDB is supposed to be a drop-in replacement for MySql, but I haven't experimented with it yet.


P.S. I noticed that there isn't a v109 posting in the Version History section.


thanks,
rob
Hi Rob,

Any software that requires a webserver will automatically have LASP installed. If the software also requires MySql, then LAMP is installed.

The current list of programs that will install LAMP/LASP are location here: https://github.com/Fourdee/DietPi/blob/ ... #L484-L512

Having an option to choose between apache2/nginx/lighttpd stacks for the above software would be great. The only issue is the sheer amount of additional testing and coding for each program using all combinations of the stacks. Its a vast job.

We choose to stick with apache2 for simplicity reasons. Not just for the coding side, but also for the end user. An example of this is LetsEncrpt, which at the time of adding to DietPi only supported Apache2 stacks.
Also, most web based software tutorials and guide use Apache2 as the base, so this ensures the end user of DietPi (no matter their skill level) can follow the guide on their existing LAMP/LASP install.

The Lighttpd and Nginx stacks are there for advanced users who want an optimized installation and webserver stack. The user is then required to setup their website programs manually.

ps. Good spot on the release notes. Added to my "list of things to do":)

pps. MariaDB with phpymadmin. In theory it should work, both work in the same way, but i've not tried it yet.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
rhkean@gmail.com

Re: Questions regarding Lighttpd

Post by rhkean@gmail.com »

Fourdee,
Thanks. that link was exactly what I needed. :)


UPDATE:
on the Lighttpd/MariaDB/phpMyAdmin topic....
the short answer is yes.... On my test Pi2, I've got Lighttpd, MariaDB and phpMyAdmin working together. There was a long of trial and error and "undoing that attempt" situations... so I've got to rebuild the machine again tonight and try again to see if I can accomplish the goal in 1 swoop that is automatable...

-rob
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: Questions regarding Lighttpd

Post by Fourdee »

rhkean@gmail.com wrote:Fourdee,
Thanks. that link was exactly what I needed. :)


UPDATE:
on the Lighttpd/MariaDB/phpMyAdmin topic....
the short answer is yes.... On my test Pi2, I've got Lighttpd, MariaDB and phpMyAdmin working together. There was a long of trial and error and "undoing that attempt" situations... so I've got to rebuild the machine again tonight and try again to see if I can accomplish the goal in 1 swoop that is automatable...

-rob
Excellent.

You can create a backup (system restore point) on your DietPi system. This will allow you to revert the root filesystem back to a previous state.

http://dietpi.com/phpbb/viewtopic.php?f ... rt=30#p255

Code: Select all

dietpi-backup
As an example:
When I do a fresh DietPi install for testing, once the basic installation process is completed (eg: nothing installed), I create a dietpi-backup before doing anything else.
Once I've finished "fiddling" and testing, i simply restore the previous backup. Means I dont need to rewrite the DietPi image :)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
rhkean@gmail.com

Re: Questions regarding Lighttpd

Post by rhkean@gmail.com »

Fourdee wrote: You can create a backup (system restore point) on your DietPi system. This will allow you to revert the root filesystem back to a previous state.

http://dietpi.com/phpbb/viewtopic.php?f ... rt=30#p255

Code: Select all

dietpi-backup
As an example:
When I do a fresh DietPi install for testing, once the basic installation process is completed (eg: nothing installed), I create a dietpi-backup before doing anything else.
Once I've finished "fiddling" and testing, i simply restore the previous backup. Means I dont need to rewrite the DietPi image :)
NICE! I'll read up on that.

Also... regarding Linux-Dash.... I installed it manually the same way it's coded in dietpi-software (https://github.com/Fourdee/DietPi/blob/ ... 1087-L1108)...
works perfectly.

UPDATE... same with phpSysInfo
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: Questions regarding Lighttpd

Post by Fourdee »

rhkean@gmail.com wrote: Also... regarding Linux-Dash.... I installed it manually the same way it's coded in dietpi-software (https://github.com/Fourdee/DietPi/blob/ ... 1087-L1108)...
works perfectly.

UPDATE... same with phpSysInfo
Awesome.

Come to think of it, it's only the web software that we install with apt-get that would be an issue for non-apache webstacks.
I know Owncloud is an apt-get (using opensuse repo), but I'll have to look over the code for all of them to be sure.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
rhkean@gmail.com

Re: Questions regarding Lighttpd

Post by rhkean@gmail.com »

here's the patch for getting phpMyAdmin to work properly with Lighttpd and MySql or MariaDB....
basically 1 line to change on the debconf-set-selections and tweak the cgi.fix_pathinfo line of the php.ini

I've tested on my Pi2, but haven't had a chance to steal the XU4 from the family yet....

Code: Select all

--- dietpi/v109/dietpi-software 2016-02-21 21:30:25.637372620 -0500
+++ dietpi/v110/dietpi-software 2016-02-21 21:31:56.742372631 -0500
@@ -755,7 +755,11 @@
                        echo -e "phpmyadmin      phpmyadmin/password-confirm     password dietpi" | debconf-set-selections
                        echo -e "phpmyadmin      phpmyadmin/setup-password       password dietpi" | debconf-set-selections
                        echo -e "phpmyadmin      phpmyadmin/mysql/app-pass       password dietpi" | debconf-set-selections
-                       echo -e "phpmyadmin      phpmyadmin/reconfigure-webserver        multiselect     apache2" | debconf-set-selections
+                       if (( $WEBSERVER_LIGHTTPD > 0 )); then
+                               echo -e "phpmyadmin      phpmyadmin/reconfigure-webserver        multiselect     lighttpd" | debconf-set-selections
+                       else
+                               echo -e "phpmyadmin      phpmyadmin/reconfigure-webserver        multiselect     apache2" | debconf-set-selections
+                       fi
 
                        AGI phpmyadmin
 
@@ -2591,6 +2595,9 @@
                        if (( $WEBSERVER_NGINX == 2 )); then
                                ln -s /usr/share/phpmyadmin /var/www
                        fi
+                       if (( $WEBSERVER_LIGHTTPD == 2 )); then
+                               sed -i 's|\(^cgi.fix_pathinfo=\)0|\11|' /etc/php5/fpm/php.ini
+                       fi
 
                        WEBSERVER_MYADMINPHP=2
                fi
also, I'm sure the " if (( WEBSERVER_LIGHTTPD > 0 )); then" should be =1 or =2, but I wasn't sure....
User avatar
Fourdee
Site Admin
Posts: 2787
Joined: Tue Feb 06, 2007 1:36 pm

Re: Questions regarding Lighttpd

Post by Fourdee »

I've tested on my Pi2, but haven't had a chance to steal the XU4 from the family yet....
This is a perfect chance to play the "I think we need another XU4" card ;) Then explain everything possible the device can do. Works on my misses every time lol :)
here's the patch for getting phpMyAdmin to work properly with Lighttpd and MySql or MariaDB....
Nice one!

The values are:
0 = Not installed
1 = Selected for install
2 = Installed

The PHPmyadmin config section runs after lighttpd has finished installation, at which stage WEBSERVER_LIGHTTPD=2. So any of the following would work:

Code: Select all

if (( $WEBSERVER_LIGHTTPD > 0 )); then
if (( $WEBSERVER_LIGHTTPD == 2 )); then
My XU4 is also busy doing other stuff. I cant see any issues cropping up on a device basis, but its worth a test.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Post Reply