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.

PHP for admin interface not working after initial setup

Featured Replies

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).

Solved by d00p

Go to solution
  • Solution

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

  • Author

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 🤔

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

  • Author

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?

there should be a file `/etc/cron.d/froxlor` which includes the cronjob calls

  • Author
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.

  • Author
1 minute ago, d00p said:

there should be a file `/etc/cron.d/froxlor` which includes the cronjob calls

Yes, thank you 👍

Create an account or sign in to comment

Account

Navigation

Search

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.