Jump to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi guys,

I have basic installation of froxlor with Apache2 and php on Ubuntu 20.04 as is.

# php --version
PHP 7.4.3 (cli) (built: Aug 13 2021 05:39:12) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

I want to reconfigure it to Apache2 wit php-fpm for better performance.

I came across this doc: https://github.com/Froxlor/Froxlor/wiki/apache2-with-php-fpm it is 5 yers old.

I just wanted to know what is a best practice procedure for my task?

What is a best way to approach it?

Thank you in advance for your time.

p.s.: I was thinking about switching to ngnix, but I think it is way too complicated. Or not?

Solved by d00p

Go to solution

Stop your cron daemon. Goto settings, activate php-fpm, check that all other settings are suitable for your system.

Also check that you have "use mod_proxy" enabled in the settings.

Check under "fpm versions" (left side menu) that the executable and paths are correct. 

Goto configuration and go through Webserver config-templates, system -> libnss-extrausers and of course php-fpm.

Don't forget to re-enable Cron daemon again.

Webserver Change is also possible but you need to adjust a few paths in the settings according to the Webserver. Also when given through every config you might need to stop the old webserver and restart the new one due to the binding on the same ports.

  • Author

@d00p THANK YOU VERY MUCH!!!

I will give it a try tomorrow morning.

  • Author

I was carefully following the instructions but...

Somehow I came to this:

# php /var/www/froxlor/scripts/froxlor_master_cronjob.php --force
sh: 1: /etc/init.d/bind9: not found
[error] Error while running `/etc/init.d/bind9 reload`: exit code (127) - please check your system logs
Job for php7.4-fpm.service failed because the control process exited with error code.
See "systemctl status php7.4-fpm.service" and "journalctl -xe" for details.
sh: 1: nscd: not found
sh: 1: nscd: not found

Note: bind9 and nscd are missing because I do not use them. I didn't configure it at all. It is not related to PHP FPM.

Then:

# service php7.4-fpm status
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
     Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-10-14 17:46:13 CEST; 9min ago
       Docs: man:php-fpm7.4(8)
    Process: 214347 ExecStart=/usr/sbin/php-fpm7.4 --nodaemonize --fpm-config /etc/php/7.4/fpm/php-fpm.conf (code=exited, status=78)
    Process: 214355 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS)
   Main PID: 214347 (code=exited, status=78)

Oct 14 17:46:13 host1 systemd[1]: Starting The PHP 7.4 FastCGI Process Manager...
Oct 14 17:46:13 host1 php-fpm7.4[214347]: [14-Oct-2021 17:46:13] ERROR: [pool mydomain123.com] cannot get uid for user 'editor1'
Oct 14 17:46:13 host1 php-fpm7.4[214347]: [14-Oct-2021 17:46:13] ERROR: FPM initialization failed
Oct 14 17:46:13 host1 systemd[1]: php7.4-fpm.service: Main process exited, code=exited, status=78/CONFIG
Oct 14 17:46:13 host1 systemd[1]: php7.4-fpm.service: Failed with result 'exit-code'.
Oct 14 17:46:13 host1 systemd[1]: Failed to start The PHP 7.4 FastCGI Process Manager.

 

In configs that Froxlor gave me I saw nothing about mysql. Maybe I missed something, but I think that PHP-FPM is missing link MySQL:

Oct 14 17:46:13 host1 php-fpm7.4[214347]: [14-Oct-2021 17:46:13] ERROR: [pool mydomain123.com] cannot get uid for user 'editor1'
Oct 14 17:46:13 host1 php-fpm7.4[214347]: [14-Oct-2021 17:46:13] ERROR: FPM initialization failed

 

--------------------------------

 

I can try to edit /etc/php/7.4/fpm/pool.d/mysomain123.com.conf

and change this section:

user = editor1
group = editor1

But it is hacking over froxlor. I believe I mixed something up...

Any ideas?

 

you might be missing libnss-extrausers....

  • Author

@d00p I just revalidated libnss-extrausers setup.

Everything is done according to the instruction from froxlor. The only thing is /etc/nsswitch.conf file:

# Make sure that `passwd`, `group` and `shadow` have extrausers in their lines
# You should place extrausers at the end, so that it is queried after the other mechanisams
#
passwd:         files systemd compat extrausers
group:          files systemd compat extrausers
shadow:         files compat extrausers
gshadow:        files

hosts:       files dns
networks:    files dns

protocols:   db files
services:    db files
ethers:      db files
rpc:         db files

netmasks:    files
netgroup:    files
bootparams:  files

automount:   files
aliases:     files

Is it correct file?

 

Also files in /var/lib/extrausers all have root as owner and they are empty.

root@host1 /var/lib/extrausers # ls -Al
total 0
-rw-r--r-- 1 root root 0 Oct 14 17:34 group
-rw-r--r-- 1 root root 0 Oct 14 17:34 passwd
-rw-r--r-- 1 root root 0 Oct 14 17:34 shadow
root@host1 /var/lib/extrausers # cat group
root@host1 /var/lib/extrausers # cat passwd
root@host1 /var/lib/extrausers # cat shadow
root@host1 /var/lib/extrausers #

 

Any idea?

  • Solution

Settings -> System -> Use libnss-extrausers instead of libnss-mysql

  • Author
17 minutes ago, d00p said:

Settings -> System -> Use libnss-extrausers instead of libnss-mysql

I found it! Should I reconfigure everything?

Just the section for libnss-extrausers (if not done already).

The cronjob does the rest.

  • Author

PHP-FPM is ok now:

# service php7.4-fpm status
● php7.4-fpm.service - The PHP 7.4 FastCGI Process Manager
     Loaded: loaded (/lib/systemd/system/php7.4-fpm.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-10-14 19:50:01 CEST; 1min 7s ago
       Docs: man:php-fpm7.4(8)
    Process: 221505 ExecStartPost=/usr/lib/php/php-fpm-socket-helper install /run/php/php-fpm.sock /etc/php/7.4/fpm/pool.d/www.conf 74 (code=exited, status=0/SUCCESS)
   Main PID: 221485 (php-fpm7.4)
     Status: "Processes active: 0, idle: 16, Requests: 0, slow: 0, Traffic: 0req/sec"
      Tasks: 17 (limit: 76846)
     Memory: 20.2M
     CGroup: /system.slice/php7.4-fpm.service
             ├─221485 php-fpm: master process (/etc/php/7.4/fpm/php-fpm.conf)
             ├─221489 php-fpm: pool mydomain12345.com
             ├─221490 php-fpm: pool mydomain12345.com

 

But in server admin I still see:

Server API: Apache 2.0 Handler

Any ideas why?

Fpm can be setup for customers and froxlor itself separately. See settings -> froxlor virtual host settings

  • Author
18 minutes ago, d00p said:

Fpm can be setup for customers and froxlor itself separately. See settings -> froxlor virtual host settings

Thank you!

Do you I need to enable FPM for customers?

If you've just enabled php-fpm then no, it's activated globally and for customers. only the froxlor vhost itself can be separated

 

  • Author

Huray! Customers sites have FPM/FastCGI!

But froxlor itself is crashed because it cannot find user to run froxlor ;-)

Manually trying to switch froxlor back simple apache mode.

---

Fixed. Everything works now :-) Thank you!

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.