Jump to content
Froxlor Forum
  • 2

[Howto] Debian 9 | Ubuntu Cosmic + PHP 7.3 / MariaDB / NGINX / PHP-FPM / SSL


みゆき

Question

Warning, this is not an official guide!!!

1.

sudo mv /etc/apt/source.list /etc/apt/source.list.bak

1a. Create new Source.list

sudo nano /etc/apt/source.list

1b.  insert (for Debian Stretch)

Spoiler

###### Debian Main Repos
deb http://ftp.de.debian.org/debian/ stable main contrib non-free
deb-src http://ftp.de.debian.org/debian/ stable main contrib non-free
deb http://ftp.de.debian.org/debian/ stable-updates main contrib non-free
deb-src http://ftp.de.debian.org/debian/ stable-updates main contrib non-free
deb http://security.debian.org/ stable/updates main
deb-src http://security.debian.org/ stable/updates main
deb http://ftp.debian.org/debian stretch-backports main
deb-src http://ftp.debian.org/debian stretch-backports main

###### Extra Repos

###Debian Multimedia
deb [arch=i386,amd64] http://www.deb-multimedia.org stretch main non-free

###nginx
deb [arch=amd64,i386] http://nginx.org/packages/debian/ stretch nginx
deb-src [arch=amd64,i386] http://nginx.org/packages/debian/ stretch nginx

###php7.X | curl https://packages.sury.org/php/apt.gpg | apt-key add -
deb https://packages.sury.org/php/ $(lsb_release -sc) main

### MariaDB 10.3
### http://downloads.mariadb.org/mariadb/repositories/
deb [arch=amd64,i386,ppc64el] http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.3/debian stretch main
deb-src http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.3/debian stretch main

1.2B (for Ubuntu Cosmic)

Spoiler

###### Ubuntu Main Repos
deb http://de.archive.ubuntu.com/ubuntu/ cosmic main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ cosmic main restricted universe multiverse

###### Ubuntu Update Repos
deb http://de.archive.ubuntu.com/ubuntu/ cosmic-security main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ cosmic-updates main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ cosmic-proposed main restricted universe multiverse
deb http://de.archive.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ cosmic-security main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ cosmic-updates main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ cosmic-proposed main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse

###### MariaDB 10.3 repository list - created 2019-01-25 21:01 UTC
###### http://downloads.mariadb.org/mariadb/repositories/
deb [arch=amd64] http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.3/ubuntu cosmic main
deb-src http://ftp.hosteurope.de/mirror/mariadb.org/repo/10.3/ubuntu cosmic main

###### Nginx Mainline
###### https://launchpad.net/~nginx/+archive/ubuntu/development
deb http://ppa.launchpad.net/nginx/development/ubuntu cosmic main 
deb-src http://ppa.launchpad.net/nginx/development/ubuntu cosmic main

###### PHP7.X
###### https://launchpad.net/~ondrej/+archive/ubuntu/php
deb http://ppa.launchpad.net/ondrej/php/ubuntu cosmic main 
deb-src http://ppa.launchpad.net/ondrej/php/ubuntu cosmic main
 

 

1c

sudo apt update && sudo apt dist-upgrade && sudo apt autoclean && sudo apt autoremove

1d

sudo apt install curl wget apt-transport-https dirmngr git software-properties-common

Now you can start setting up your server

2. MariaDB install
Warning use sudo command für this install!

sudo apt install mariadb-server mariadb-client

2a. MariaDB 10.3 Workround (Optional)

Spoiler

when you MariaDB install with not sudo command, have you Problems with your Froxlor install. 
you can use this workround: (Thanks J-BBB for this Note :) )


mysql -u root
MariaDB [(none)]> update mysql.user set password=password('your PASS') where user='root';
MariaDB [(none)]> update mysql.user set plugin='' where user='root';
MariaDB [(none)]> flush privileges;

 

3. nginx install

sudo apt install nginx

3a

mkdir /etc/nginx/sites-available
mkdir /etc/nginx/sites-enabled

3b. nano /etc/nginx/nginx.conf

Spoiler

user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
    worker_connections 768;
    multi_accept on;
}

http {

    ##
    # Basic Settings
    ##

    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /etc/nginx/mime.types;
        #include /etc/nginx/naxsi.rules;
        #include /etc/nginx/naxsi-wp.rules;
    default_type application/octet-stream;

    ##
    # SSL Settings
    ##

    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
    ssl_prefer_server_ciphers on;

    ##
    # Logging Settings
    ##

    access_log /var/log/nginx/access.log;
    error_log /var/log/nginx/error.log;

    ##
    # Gzip Settings
    ##

    gzip_vary on;
    gzip_proxied any;

    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    ##
    # Virtual Host Configs
    ##

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;
}


#mail {
#    # See sample authentication script at:
#    # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript

#    # auth_http localhost/auth.php;
#    # pop3_capabilities "TOP" "USER";
#    # imap_capabilities "IMAP4rev1" "UIDPLUS";

#    server {
#        listen     localhost:110;
#        protocol   pop3;
#        proxy      on;
#    }

#    server {
#        listen     localhost:143;
#        protocol   imap;
#        proxy      on;
#    }
#}

4. PHP install

sudo apt-get -y install php7.3-fpm php7.3-mysql php7.3-curl php7.3-gd php7.3-intl php-pear php-imagick php7.3-imap php-memcache php7.3-pspell php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl php7.3-mbstring php-gettext php7.3-mysql php7.3-curl php7.3-gd php7.3-intl php-pear php-imagick php7.3-imap php-memcache php7.3-memcached php7.3-pspell php7.3-recode php7.3-sqlite3 php7.3-tidy php7.3-xmlrpc php7.3-xsl php7.3-mbstring php-gettext php7.3-fpm php7.3-cli php7.3-cgi php-bcmath php-zip php7.3-fpm php7.3-curl php7.3-gd php7.3-mysql php7.3-mbstring php7.3-zip php7.3-bcmath zip unzip

4a

sudo service nginx restart
sudo service php7.3-fpm restart

Froxlor install
There are two ways to get Froxlor. Stable (wget) and Beta Build (git / Master)

Stable Version

1

cd /var/www/html/

1a

sudo https://files.froxlor.org/releases/froxlor-latest.tar.gz && sudo tar xzfv froxlor-latest.tar.gz

or

Git Version (Beta Version)

sudo git clone https://github.com/Froxlor/Froxlor.git && sudo chown -HR www-data:www-data Froxlor/
sudo apt install composer 
su - www-data -s /bin/bash
cd /var/www/html/Froxlor/

1a(2). Composer install in your Froxlor directory

composer install --no-dev
Spoiler

composer install --no-dev
Loading composer repositories with package information
Updating dependencies
Package operations: 5 installs, 0 updates, 0 removals
  - Installing psr/log (1.1.0): Loading from cache
  - Installing monolog/monolog (1.24.0): Downloading (100%)         
  - Installing mso/idna-convert (v1.1.0): Downloading (100%)         
  - Installing phpmailer/phpmailer (v6.0.7): Downloading (100%)         
  - Installing robthree/twofactorauth (1.6.5): Downloading (100%)         
Writing lock file
Generating autoload files
> if [ -f ./vendor/bin/phpcs ]; then "vendor/bin/phpcs" --config-set installed_paths vendor/phpcompatibility/php-compatibility ; fi
 

1b. 

sudo chown -R www-data:www-data Froxlor/

Set up Froxlor

2. Open Your Browser

2a.

http://your IP or Hostname/Froxlor

262874432_froxlor1.JPG.de1b8879ed2a836192848f408702e622.JPG

 

1c4092bcfa.jpg.d00787c866a2075facd1e5a07a19311e.jpg

Install Froxlor finish

 3d. Move userdata (Optional

sudo mv /tmp/userdata.inc.php /var/www/html/Froxlor/lib/

2c. 

sudo rm /etc/nginx/site-enable/default

don't restart nginx!

Froxlor Settings

1. Cronjob

sudo nano /etc/cron.d/froxlor

insert 

#
# Set PATH, otherwise restart-scripts won't find start-stop-daemon
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
#
# Regular cron jobs for the froxlor package
#
# Please check that all following paths are correct
#
*/5 * * * *    root    /usr/bin/nice -n 5 /usr/bin/php -q /var/www/html/Froxlor/scripts/froxlor_master_cronjob.php
sudo chmod 0640 "/etc/cron.d/froxlor"
sudo chown root:0 "/etc/cron.d/froxlor"
sudo service cron restart

2. Nginx PHP Backend
Settings > Webserver settings > Nginx PHP backend

from 127.0.0.1:8888 to unix:/run/php/php7.3-fpm.sock

3. 

sudo mkdir -p /var/customers/webs/
sudo mkdir -p /var/customers/logs/
sudo mkdir -p /var/customers/tmp
sudo chmod 1777 /var/customers/tmp
sudo service nginx restart

4IPs and Ports > Add IP/Port

5a0abb2913e96_2port80.jpg.5de52e0487f1e64183bc623a6be546c1.thumb.jpg.3a05a38a43a4172cd4c1d7d01d66fd3c.jpg

2a(1), SSL Port

ssl.jpg.dfd261bca0c36bd2082ef209dae1899e.thumb.jpg.9513d8374c420e3331502aed2dd45b45.jpg

5a0abbfa454e0_sslport.thumb.JPG.984db8ea483048659d89b5b92884d19b.JPG.51efe8bd99067b361f56af2986d3098e.JPG

e0da66b243.thumb.jpg.956b94b1262115a358704d3a595cf209.jpg

Wait 5min for Autimatic Start Froxlor's cronjob or start the cronjob manually

sudo php /var/www/html/Froxlor/scripts/froxlor_master_cronjob.php --force --debug

Optional

PHP-FPM activate

1. User/Group add

sudo adduser froxlorlocal --disabled-password --no-create-home && sudo usermod -a -G www-data froxlorlocal

2. libnss-extrausers install 

sudo apt install nscd libnss-extrausers
sudo mkdir -p /var/lib/extrausers
sudo touch /var/lib/extrausers/{passwd,group,shadow}
sudo mv "/etc/nsswitch.conf" "/etc/nsswitch.conf.frx.bak"
sudo nano /etc/nsswitch.conf
# Make sure that `passwd`, `group` and `shadow` have mysql in their lines
# You should place mysql at the end, so that it is queried after the other mechanisams
#
passwd:         compat extrausers
group:          compat extrausers
shadow:         compat extrausers

hosts:       files dns
networks:    files dns

services:    db files
protocols:   db files
rpc:         db files
ethers:      db files
netmasks:    files
netgroup:    files
bootparams:  files

automount:   files
aliases:     files
sudo service nscd restart
sudo nscd --invalidate=group

2a. Settings > System settings > Activate > Use libnss-extrausers instead of libnss-mysql

5a0ab9076514b_mysqllibnss.JPG.12412b89cfb570aacbb9ba20cc018632.JPG.20574ef70c9e0d8671e6f7e40cf90a32.JPG

3. Settings > PHP-FPM > Activated:
Change from NO to YES

3a. PHP-FPM versions
Change > php-fpm restart command:

service php7.3-fpm restart

and

Configuration directory of php-fpm: > to 

/etc/php/7.3/fpm/pool.d/

3b. Settings > Froxlor VirtualHost settings > Activate > Enable PHP-FPM for the Froxlor vHost

5a0ab9ad113be_froxlorfpm.JPG.f9851e4e1b4a69e51c530866f342a3be.JPG.39fa67062ec1055f32555c0f0e298f71.JPG

3c

sudo chown -HR froxlorlocal:froxlorlocal /var/www/html/Froxlor

SSL / Let's Encrypt activate

1.

sudo apt install certbot

1a

sudo mkdir /etc/nginx/ssl && cd /etc/nginx/ssl

1bCreate SSL File

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt

1c

sudo nano /etc/nginx/acme.conf

insert

location /.well-known/acme-challenge {
    alias /var/www/html/Froxlor/.well-known/acme-challenge;

    location ~ /.well-known/acme-challenge/(.*) {
        default_type text/plain;
    }
}

 

2. Open your  Froxlor Panel
Settings> SSL > Activated:
Change from NO to YES

2a. Settings > SSL > Settings
Change your path from your certificate / Keyfile

Path to the SSL certificate
insert

/etc/nginx/ssl/nginx.crt

Path to the SSL Keyfile
insert

/etc/nginx/ssl/nginx.key

2b. Settings > SSL > Settings
Activate > Enable Let's Encrypt

f1f454e31b.jpg.e41728d94b6001edbc66ee089192c8be.jpg

Change Path to the acme.conf snippet to > 

/etc/nginx/acme.conf

2c. Activate on Settings > Froxlor VirtualHost settings
- Enable Let's Encrypt for the froxlor vhost
- Enable SSL-redirect for the froxlor vhost
- HTTP Strict Transport Security (HSTS)
- Include HSTS for any subdomain

8bc097eda1.thumb.jpg.56a411c412ad233b0fd15f95ad159606.jpg

mysql libnss.JPG

froxlor fpm.JPG

2port 80.jpg

ssl.jpg

ssl port.JPG

2d. Activated HTTP2 Support on > Settings > Nginx

 

Link to comment
Share on other sites

Recommended Posts

  • 1

@irisdina: Danke für deine TOP Anleitung. Ich habe das Howto unter Ubuntu 17.10 (Artful) installiert.

Ich habe noch folgende Anmerkungen:

2a. MariaDB 10.1 Workround (Optional)  sollte nicht nur Debian, sondern auch Ubuntu 17.10 stehen, da ich dies auch brauchte.

PHP-FPM activate

2. libnss-extrausers install (hier fehlt apt)

sudo install nscd libnss-extrausers

Nach der Konfiguration von PHP-FPM nach der Anleitung kam immer der Gateway Fehler 502.

Das konnte ich mit folgendem Befehl lösen:

usermod -a -G www-data froxlorlocal

Link to comment
Share on other sites

  • 0
12 hours ago, J-B said:

Was spricht denn gegen die MariaDB von Debian Stretch?

In den Alten Versionen gab es ein Problem/Bug/Feature, dass man kein PW ändern konnte bzw. bei dem Install setzen konnte und später erst nervig ein PW einstellen konnte.

 

2 hours ago, d00p said:

seitens froxlor selbst nix :)

will man doch hoffen, das Froxlor nichts dagegen hat :P

Link to comment
Share on other sites

  • 0
21 hours ago, Infected said:

Dies braucht aber doch (laut alter Anleitung) das Paket "libnss-mysql", welches es unter Debian 9 Stretch nicht mehr gibt.

Wird dieses nicht mehr benötigt, oder warum wird es hier nicht erwähnt? 

Das ist seit debian 8 nicht mehr bei debian dabei. Nutze am besten für debian 8 und 9 libnss-extrausers, dafür auch in froxlor den support aktivieren in den einstellungen

Link to comment
Share on other sites

  • 0

Guten Tag,

 

Ich habe es nach der Anleitung oben durch geführt.

Bis zum letzten schritt bis auf die Sache mit acme.con das wollte ich erst danach machen.

Doch eine neue vhost datei hat mir Froxlor nicht angelegt.

oder dauert das einen Moment bis das durch läuft?

Link to comment
Share on other sites

  • 0

hä? Wie wie muss ich das einrichten? Du aktivierst Let's Encrypt in den Einstellungen (global), du musst natürlich die acme.conf einrichten (konfiguration -> webserver) damit der globale Alias existiert und Ende. das wars. Entsprechend musst du natürlich auch einer SSL-enabled domain noch sagen, sie soll let's encrypt nutzen (domain -> bearbeiten)

Link to comment
Share on other sites

  • 0
11 hours ago, lino16 said:

@irisdina: Danke für deine TOP Anleitung. Ich habe das Howto unter Ubuntu 17.10 (Artful) installiert.

Ich habe noch folgende Anmerkungen:

2a. MariaDB 10.1 Workround (Optional)  sollte nicht nur Debian, sondern auch Ubuntu 17.10 stehen, da ich dies auch brauchte.

PHP-FPM activate

2. libnss-extrausers install (hier fehlt apt)


sudo install nscd libnss-extrausers

Nach der Konfiguration von PHP-FPM nach der Anleitung kam immer der Gateway Fehler 502.

Das konnte ich mit folgendem Befehl lösen:

usermod -a -G www-data froxlorlocal

Wenn du es zu 100% nach dem Howto gemacht hast, sollte dies nicht auftreten mit MariaDB, da bei der Ubu Anleitung die 10.2 drin ist.
Das mit dem error 502 passiert eigentlich nur, wenn man vergisst den Froxlor ordner die rechte vorher von www-data zu geben, dann passiert dies.

Habe die zwei anmerkungen ins Howto aufgenommen, danke.

Link to comment
Share on other sites

  • 0

Danke für das Klasse Tutorial !!!

Bei mir hat alles geklappt.

Eine Anmerkung, ich musste nach der Installation noch folgenden Eintrag bei den Froxlor EInstellungen machen, sonst gingen meine vHost Container nicht (siehe Bild).

Ich habe auch den 502 Fehler bekommen, das lag bei mir daran das im Verzeichnis

/etc/php/7.1/fpm/pool.d/

keine Datei angelegt war, deshalb kam mein php-fpm nicht hoch. Ich habe dann die Konfig so geändert das der php-fpm kurz starten konnte, dann es wieder umgestellt wie im Tutorial und dann erst konnte Froxlor die Datei anlegen ( also php Datei für den Froxlor vHost ) und dann kam der php-fpm wieder hoch.

Bei Ubuntu 17.10 musste ich nginx und php-fpm noch in den Autostart reinnehmen, die kamen nach Installation nicht automatisch hoch.

 

Und bei

2a(1), SSL Port

wäre noch zu sagen, dass man vorher in den Einstellungen "SSL Aktivieren" anklicken muss, sonst kann man den SSL Port nicht anlegen.

 

Ansonsten geiles Tutorial, bitte in die aktuelle Froxlor Installation mit aufnehmen. Die unterscheidet sich ja doch etwas von der im Backend.

vhost.PNG

Link to comment
Share on other sites

  • 0

One more thing.

I had the Problem that I had to disable the mysql Strict Mode.

Otherwise I had the error

SQLSTATE[HY000]: General error: 1364 Field 'mail_virtual' doesn't have a default value

Everytime I wanted to delete a Domain.

I did it with the following Instruction:

https://serverpilot.io/community/articles/how-to-disable-strict-mode-in-mysql-5-7.html

After that I created the table with:

ysql> CREATE TABLE `mail_virtual` (
    ->   `id` int(11) NOT NULL auto_increment,
    ->   `email` varchar(255) NOT NULL default '',
    ->   `email_full` varchar(255) NOT NULL default '',
    ->   `destination` text NOT NULL default '',
    ->   `domainid` int(11) NOT NULL default '0',
    ->   `customerid` int(11) NOT NULL default '0',
    ->   `popaccountid` int(11) NOT NULL default '0',
    ->   `iscatchall` tinyint(1) unsigned NOT NULL default '0',
    ->   PRIMARY KEY  (`id`),
    ->   KEY `email` (`email`)
    -> ) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_general_ci;

 

Link to comment
Share on other sites

  • 0

Hi Danke dir für die Antwort,

die habe ich allerdings am Sonntag benutzt bei der Installation.
Und nach der Installation war die TABLE nicht da.

Hattest du jüngst ein Update gemacht ?

Nutze Ubuntu 17.10 und die neueste mysql-server dazu.

 

Ich habe auch nach der Installation das Problem mit Letsencrypt, das ich nicht auf die Datei ( zum testen wie du in vielen Beiträgen hier empfohlen hast ) ( oder neuen Forumsbeitrag dazu aufmachen ? )

Suche mich da seit 14 Stunden wund :-) :

/var/www/cust01.DOMAIN.com/.well-known/acme-challenge/test.html

Zugreifen kann, damit Letsencrypt geht.

Wenn ich darauf zugreife schreibt der nginx laut error.log immer:

2017/12/12 15:21:34 [error] 12563#12563: *27 open() "/var/www.cust01.DOMAIN.com/.well-known/acme-challenge/test.html" failed (2: No such file or directory), client: 31.16.227.7, server: cust01.DOMAIN.com, request: "GET /.well-known/acme-challenge/test.html HTTP/2.0", host: "cust01.DOMAIN.com"

Weißt du woran das liegt das es so komisch umgeschrieben wird , also der "/" statt des "." geschrieben wird ?

Meine /etc/nginx/acme.conf ist gemäß Tutorial:

location /.well-known/acme-challenge {
        alias /var/www/cust01.DOMAIN.com/.well-known/acme-challenge;

        location ~ /.well-known/acme-challenge/(.*) {
                default_type text/plain;
        }
}

Wenn ich test.html in das Verzeichnis

/var/www/cust01.DOMAIN.com/.well-known/test.html

lege, funktioniert der Aufruf der Datei.

Das ist das einzige was mich nach der Installationsanleitung grade noch am Betrieb hindert.

Die SSL Zerts sind laut Doku von oben auch nur bei folgendem hinterlegt ( siehe Bild ).
Mit IP/Ports kam aber trotzdem der Umschreibefehler wenn ich das Zertifikat dort angegeben habe.

PS: Vhost von 80 und 443 sind:

        listen    93.104.212.200:80 default_server;
        # Froxlor default vhost
        server_name    cust01.DOMAIN.com;
        access_log      /var/log/nginx/access.log;
        include /etc/nginx/acme.conf;
# temp. disabled ssl-redirect due to Let's Encrypt certificate generation.
        root     /var/www/cust01.DOMAIN.com/;
        index    index.php index.html index.htm;

        location / {
        }
return 301 https://$host$request_uri;
        location ~ \.php {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                include /etc/nginx/fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                try_files $fastcgi_script_name =404;
                fastcgi_pass unix:/var/run/froxlor.panel-cust01.DOMAIN.com-php-fpm.socket;
                fastcgi_index index.php;
        }
}
# Created 12.12.2017 15:15
# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.

server {
        listen    93.104.212.200:443 default_server ssl http2;
        # Froxlor default vhost
        server_name    cust01.DOMAIN.com;
        access_log      /var/log/nginx/access.log;
        include /etc/nginx/acme.conf;
        root     /var/www/cust01.DOMAIN.com/;
        index    index.php index.html index.htm;

        location / {
        }
        ssl_protocols TLSv1 TLSv1.2;
        ssl_ciphers ECDH+AESGCM:ECDH+AES256:!aNULL:!MD5:!DSS:!DH:!AES128;
        ssl_ecdh_curve secp384r1;
        ssl_prefer_server_ciphers on;
        ssl_certificate /etc/letsencrypt/live/cust01.DOMAIN.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/cust01.DOMAIN.com/privkey.pem;
        location ~ \.php {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                include /etc/nginx/fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                try_files $fastcgi_script_name =404;
                fastcgi_param HTTPS on;
                fastcgi_pass unix:/var/run/froxlor.panel-cust01.DOMAIN.com-php-fpm.socket;
                fastcgi_index index.php;
        }
}


 

ssl-cert.PNG

ssl-cert-2.PNG

Link to comment
Share on other sites

  • 0

UPDATE:
Hab den Fehler gefunden, das Verzeichnis

/var/www/cust01.DOMAIN.com/.well-known/acme-challenge

Hatte die Rechte

drwxr-xr-x  2 froxlorlocal froxlorlocal 4096 Dec 12 16:08 acme-challenge

Ich habe dann die Rechte

drwxr-xr-x  2 www-data www-data 4096 Dec 12 16:08 acme-challenge

gesetzt und konnte die Datei aufrufen.

Jetzt hat Froxlor es wieder zu

drwxr-xr-x  2 froxlorlocal froxlorlocal 4096 Dec 12 16:08 acme-challenge

gemacht, aber ich kann es jetzt ohne Probleme aufrufen.

Jetzt klappts auch wieder mit dem nachbarn.

 

Einziges letztes Problem ist, das Letsencrypt sich gerade nicht automatisch Cronjobed. Muss es noch manuell anstoßen, vllt liegts daran das ich das Zertifikat nicht bei IP/Ports habe

 

UPDATE 2:

Der Cron war nicht eingetragen, vieleicht weil Letsencrypt nicht funktioniert hatte zuvor.
Jetzt funktioniert es. Das mit dem Verzeichnisrecht ist mir allerdings immernoch ein Rätsel.

Link to comment
Share on other sites

  • 0

@irisdina

DANKE ! perfektes Howto - sieht man selten :) 
Habe alles mal mit Debian 9.3, PHP 7.2.1 aufgesetzt - bis jetzt läuft es fast ohne den kleinsten Fehler, im Grund System - nur wenn ich den vhost frox lösche, ladet das Admin Panel nicht mehr mit not found - wo könnte ich da was falsch gesetzt haben ?
Ich glaube ich habe irgendwas übersehen - nur der Wald hat irgendwie zuviel Bäume ;) 

kleine Frage - bring die "PHP-FPM activate" noch merkliche Vorteile oder wäre sonst irgendwie vorteilhaft ?

@d00p

Ich bin mit Froxlor ganz neu, komme von iMSCP - maybe eine Froxlor-Newbie Frage - gibt es für Pphmyadmin, FTP, WebMail ein paar HowTo bzw. Vorschläge, was mit Froxlor am besten funktioniert 

Bzw. muss noch irgendwas nach dem Grund-Setup hinzugefügt werden, was zu empfehlen wäre 

Link to comment
Share on other sites

  • 0
9 minutes ago, MaT said:

nur wenn ich den vhost frox lösche, ladet das Admin Panel nicht mehr mit not found - wo könnte ich da was falsch gesetzt haben ?

manuell was löschen ist schonmal ein falscher ansatz

10 minutes ago, MaT said:

kleine Frage - bring die "PHP-FPM activate" noch merkliche Vorteile oder wäre sonst irgendwie vorteilhaft ?

die Frage verstehe ich nicht...du als admin entscheidest doch was du nutzen möchtest. fcgid/php-fpm hat den simplen aber schönen vorteil, dass die php prozesse unter dem kunden-benutzer ausgeführt werden (security++)

11 minutes ago, MaT said:

Ich bin mit Froxlor ganz neu, komme von iMSCP - maybe eine Froxlor-Newbie Frage - gibt es für Pphmyadmin, FTP, WebMail ein paar HowTo bzw. Vorschläge, was mit Froxlor am besten funktioniert 

phpmyadmin würd ich via archiv entweder unterhalb eines kunden (dich selbst, wenn du dich da auch angelegt hast) oder in den froxlor ordner installieren. Wenn du das auch per apt und paket machen willst UND fcgid/php-fpm nutzt kommst du sonst um einen manuellen vhost nicht herum.

Bei "FTP" weiss ich nicht was du meinst, es sei denn du meinst WebFTP - davon rate ich so oder so in jedem fall ab...

Webmail -> siehe phpmyadmin; bei roundcube kannst du mit dieser config (https://github.com/Froxlor/Froxlor/tree/extras/roundcube_plugins/password) das "passwort ändern" in roundcube realisieren

Offizielle Howtos oder so gibt es dazu nicht

Link to comment
Share on other sites

  • 0
On 8.1.2018 at 10:48 AM, MaT said:

@d00p

"vhost frox löschen", meine ich in Bezug auf das HowTO oben - da ist das ja ein Schritt im Ablauf - ich habe den vhost jetzt wieder erstellt derzeit, um das Froxlor Panel zu haben 

Der Manuelle Frox vhost ist nur dazu da, weil ich froxlor ausserhalb des html verz. betreibe, sonst kann nginx nicht darauf zugreifen. Normal ist es so, wenn du Froxlor installiert hast und danach den angelegten Vhost wieder löscht, weil Froxlor selbst einen Vhost ja anlegt, sobald der Cron neu startet.

Schau mal in den ordner von nginx /etc/nginx/site-enable/ ob da Froxlor datein vorhanden sind, wenn nicht checke mal deinen cronjob.

Link to comment
Share on other sites

  • 0
Am 17.11.2017 um 21:21 schrieb lino16:

 

Nach der Konfiguration von PHP-FPM nach der Anleitung kam immer der Gateway Fehler 502.

Das konnte ich mit folgendem Befehl lösen:

usermod -a -G www-data froxlorlocal

Guten Abend zusammen,

ich freue mich eine so gute Anleitung gefunden zu haben. Ich bin noch recht neu auf dem Gebiet Froxlor, komme aus der ISPConfig Ecke. Allgemein bin ich noch ein Rookie in Sachen Ubuntu/Debian. 

Leider bin ich auch auf den 502 Gateway Fehler gestoßen und leider hilft auch usermod -a -G www-data froxlorlocal nicht. 

Vielleicht habt Ihr eine Idee woran es liegen könnte. 

Vielen Dank für Eure Hilfe.

MFG Johannes

Hier der Auszug der Fehlermeldung:

 php7.1-fpm.service - The PHP 7.1 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.1-fpm.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-02-07 19:40:02 CET; 40min ago
     Docs: man:php-fpm7.1(8)
  Process: 941 ExecStart=/usr/sbin/php-fpm7.1 --nodaemonize --fpm-config /etc/php/7.1/fpm/php-fpm.conf (code=exited, status=
 Main PID: 941 (code=exited, status=78)

Feb 07 19:40:02 v22018024008360949 systemd[1]: Starting The PHP 7.1 FastCGI Process Manager...
Feb 07 19:40:02 v22018024008360949 php-fpm7.1[941]: [07-Feb-2018 19:40:02] WARNING: Nothing matches the include pattern '/et
Feb 07 19:40:02 v22018024008360949 php-fpm7.1[941]: [07-Feb-2018 19:40:02] ERROR: No pool defined. at least one pool section
Feb 07 19:40:02 v22018024008360949 php-fpm7.1[941]: [07-Feb-2018 19:40:02] ERROR: failed to post process the configuration
Feb 07 19:40:02 v22018024008360949 php-fpm7.1[941]: [07-Feb-2018 19:40:02] ERROR: FPM initialization failed
Feb 07 19:40:02 v22018024008360949 systemd[1]: php7.1-fpm.service: Main process exited, code=exited, status=78/n/a
Feb 07 19:40:02 v22018024008360949 systemd[1]: Failed to start The PHP 7.1 FastCGI Process Manager.
Feb 07 19:40:02 v22018024008360949 systemd[1]: php7.1-fpm.service: Unit entered failed state.
Feb 07 19:40:02 v22018024008360949 systemd[1]: php7.1-fpm.service: Failed with result 'exit-code'.

 

Link to comment
Share on other sites

  • 0
vor 11 Stunden schrieb d00p:

Dein Pfad zu den fpm Pool Configs ist nicht korrekt, prüfe deine fpm Einstellungen

Guten Morgen,

vielen Dank für Deine Antwort. Leider stehe ich gerade total auf dem Schlauch :(. In dem Verzeichnis 

/etc/php/7.1/fpm/pool.d#

liegen keine .conf-Dateien? lediglich in 

/etc/php/7.0/fpm/pool.d#

liegt eine .conf Datei.

Vielen Dank.

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