Skip to content

Instantly share code, notes, and snippets.

@symdesign
Last active August 11, 2022 22:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save symdesign/ff7c0bc44d5da00cdb58fa501507064c to your computer and use it in GitHub Desktop.
Save symdesign/ff7c0bc44d5da00cdb58fa501507064c to your computer and use it in GitHub Desktop.

Install LAMP

Configure PHP/MySQL for Froxlor

Change the MySQL root password

use mysql;
update user set authentication_string=PASSWORD("PASSWORD!") where User='root';
flush privileges;

Create a database for Froxlor

While still logged into the MySQL shell, create a database called froxlor and an unprivileged user named froxlor with a password using the following commands.

create database froxlor;
reate user 'froxlor'@'localhost' IDENTIFIED BY 'PASSWORD!';
GRANT ALL PRIVILEGES ON froxlor.* TO 'froxlor'@'localhost' IDENTIFIED BY 'PASSWORD!' WITH GRANT OPTION;
exit;

Install Froxlor

Download the latest Froxlor version and unpack it inside default root of Apache so that all the files and folders for Froxlor can be found inside /var/www/html Once unpacked, assign correct ownership to the web root of Apache.

cd /var/www/html
wget  https://files.froxlor.org/releases/froxlor-latest.tar.gz
tar zxvf froxlor-latest.tar.gz
chown -R www-data:www-data /var/www/html/froxlor
rm -rf froxlor froxlor-latest.tar.gz

Now you can open the installation's directory in the webbrowser and click on "Start install" to set up databases and the admin user account.

Setup Froxlor

Connect with Let's Encrypt SSL

In System > Settings SSL settings select Activated: Yes, press Save and follow the link. Open the settings overview for SSL settings and checkmark 'Enable Let's Encrypt' and press Save again.

Go to IPs and Ports and add another entry for the existing IP.

Port: 443
Create Listen statement: No
Create vHost-Container: Yes
Is this an SSL Port?: Yes
Path to the SSL Certificate: /etc/apache2/apache2.crt
Path to the SSL Keyfile: /etc/apache2/apache2.key

In CLI cd /etc/apache2/ and generate the two specified files.

openssl req -new -newkey rsa:4096 -nodes -sha256 -out apache2.csr -keyout apache2.key
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout apache2.key -out apache2.crt

Configure Froxlor

Log-In to proceed with important configuration steps listed in System > Configuration.

  • Webserver (HTTP)
  • Nameserver (DNS)
  • Mailserver (SMTP)
  • Mailserver (IMAP/POP3)
  • FTP-server
  • Cronjob for froxlor

Make sure that there is a Snippet for "/etc/apache2/conf-enabled/acme.conf" on the Webserver configuration. If it is missing that the Let's Encrypt settings from the previous step didn't get saved.

Also, some of the command line snippet require the MySQL database password. Make sure to provide and apply it before copying.

Testing HTTPS for domains

Froxlor should be creating a certificate within next 5-15 minutes and Domains should be available via https. If not, you can trigger it yourself.

php -q /var/www/html/froxlor/scripts/froxlor_master_cronjob.php --letsencrypt --de

If it still doesn't work, please do cd /etc/apache, nano ports.conf and make sure it contains:

Listen 80

<IfModule mod_ssl.c>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

It might be the case that you have to change ssl_module to mod_ssl.c.

Create a customer

@tenent007963
Copy link

tenent007963 commented Aug 6, 2021

Should've found this guide earlier, this guide is more in-depth compare with Froxlor's setup guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment