Jump to content
Froxlor Forum
  • 0

[HELP] Reconfiguring running froxlor


Max Amigo
 Share

Question

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?

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

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.

Link to comment
Share on other sites

  • 0

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?

 

Link to comment
Share on other sites

  • 0

@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?

Link to comment
Share on other sites

  • 0

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?

Link to comment
Share on other sites

  • 0

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!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...