Jump to content
Froxlor Forum
  • 0

PHP for admin interface not working after initial setup


fritzmg

Question

On a server running Ubuntu 22.04.2 I installed Froxlor using the [apt package](https://docs.froxlor.org/latest/general/installation/apt-package.html). I created the priviliged database user and then accessed the admin web interface to complete the setup process, where everything went fine. I left everything at its default values. At the end of the setup process Froxlor asked me to execute the following on the command line with root priviliges:

/var/www/html/froxlor/bin/froxlor-cli froxlor:install -c '…'
/var/www/html/froxlor/bin/froxlor-cli froxlor:config-services -a '{"distro":"jammy","dns":"x","http":"apache24","smtp":"postfix_dovecot","mail":"dovecot_postfix2","ftp":"proftpd","system":["cron","libnssextrausers","logrotate","goaccess","php-fpm"]}' --yes-to-all

This finished without any errors. However, immediately afterwards, the admin interface / install interface did not work anymore. Instead of PHP being processed, Apache now simply returns the PHP script:

$ curl https://<domain>/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0<?php

/**
 * This file is part of the Froxlor project.
 * Copyright (c) 2010 the Froxlor Team (see authors).
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you can also view it online at
 * https://files.froxlor.org/misc/COPYING.txt
 *
 * @copyright  the authors
 * @author     Froxlor team <team@froxlor.org>
 * @license    https://files.froxlor.org/misc/COPYING.txt GPLv2
 */

const AREA = 'login';
require __DIR__ . '/lib/init.php';

…

I analysed the Apache config a bit and noticed, that under

/etc/apache2/conf-enabled

there is no

php8.1-fpm.conf -> ../conf-available/php8.1-fpm.conf

Symlink and the rest of the Apache config seems to suggest that it expects to use PHP-FPM now.

I tried to manually create the symlink and then restart Apache, however PHP-FPM is still not working:

[Wed Jul 12 10:48:23.477543 2023] [proxy:error] [pid 5568] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php8.1-fpm.sock (*) failed
[Wed Jul 12 10:48:23.477612 2023] [proxy_fcgi:error] [pid 5568] [client 172.19.0.4:41628] AH01079: failed to make connection to backend: httpd-UDS

Do I need to manually start the PHP-FPM pool in some way?

Note: after installing Froxlor, before accessing the install wizard, I did manually alter the ports that Apache listens to to 8080/8443 and I also set the DocumentRoot of the default VHost directly to /var/www/html/froxlor, so that I can access the Froxlor setup and admin interface via https://froxlor.example.com/ via the Nginx Proxy Manager that is running on the same host (see here).

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

The froxlor setup automatically sets up your ip/port entries using default/standard ports.

You might need to adjust these in the table `panel_ipsandports` in froxlor's database and re-run the cronjob

Link to comment
Share on other sites

  • 0

Hm, I see. Currently it contains the following:

+----+------------+------+
| id | ip         | port |
+----+------------+------+
|  1 | 172.17.0.1 |   80 |

i.e. the internal docker host IP. But I am not really sure what it should be when running Froxlor behind NPM 🤔

Link to comment
Share on other sites

  • 0

Never mind, just changing the port to 8080 worked 👍 Thank you :)

 

Side question: I noticed that

php /var/www/html/froxlor/bin/froxlor-cli froxlor:cron

is not present in the crontab. I assumed Froxlor's setup process adds this automatically - do I have to add this cronjob manually to the crontab?

Link to comment
Share on other sites

  • 0
Just now, Shortie said:

It works with standard ports behind a nginx proxy. There is no need changing ports because every docker container has its own ip-address.

It's different with NPM though as the container running NPM exposes ports 80 and 443 on the host system - where Froxlor is running. Thus the host's web server (for Froxlor) needs to run on a different port than the reverse proxy.

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


×
×
  • Create New...