Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:apache_http_server_archlinux_-_php-fpm_-_alternativer_php-interpreter

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
tachtler:apache_http_server_archlinux_-_php-fpm_-_alternativer_php-interpreter [2022/07/01 17:02] – [info-Konfiguration: Erster Start - php-fpm] klaustachtler:apache_http_server_archlinux_-_php-fpm_-_alternativer_php-interpreter [2022/07/01 17:55] (aktuell) – [info-Konfiguration] klaus
Zeile 266: Zeile 266:
  
 Nachfolgende Änderungen sind an dieser Konfigurationsdatei durchzuführen: Nachfolgende Änderungen sind an dieser Konfigurationsdatei durchzuführen:
- 
-**Aktuelle Möglichkeit: __TCP-IP/Port__** 
  
 **(Komplette Konfigurationsdatei)** **(Komplette Konfigurationsdatei)**
Zeile 537: Zeile 535:
 ;   '/path/to/unix/socket' - to listen on a unix socket. ;   '/path/to/unix/socket' - to listen on a unix socket.
 ; Default Value: value of the listen option ; Default Value: value of the listen option
-;pm.status_listen = 127.0.0.1:9001+; Tachtler 
 +; default: ;pm.status_listen = 127.0.0.1:9001 
 +pm.status_listen = /run/php-fpm/php-fpm-status.sock
  
 ; The ping URI to call the monitoring page of FPM. If this value is not set, no ; The ping URI to call the monitoring page of FPM. If this value is not set, no
Zeile 746: Zeile 746:
  
 Aktivieren der Statusseite durch setzen des Pfades für den Aufruf! Aktivieren der Statusseite durch setzen des Pfades für den Aufruf!
 +
 +  * <code ini>pm.status_listen = /run/php-fpm/php-fpm-status.sock</code>
 +
 +Konfiguration des **''UNIX''_Sockets** auf dem die [[https://php-fpm.org/|PHP-FPM]]-Status Informationen abgerufen werden können. 
 +
 +:!: **WICHTIG** - **Es __muss__ ein eigener ''UNIX''-Socket definiert werden!**
  
 ==== /etc/php/php-fpm.conf ====  ==== /etc/php/php-fpm.conf ==== 
Zeile 947: Zeile 953:
     * [[tachtler:apache_http_server_archlinux_-_php-fpm_-_alternativer_php-interpreter#etc_php_php-fpmd_wwwconf|Apache HTTP Server ArchLinux - php-fpm - Alternativer PHP-Interpreter - /etc/php/php-fpm.d/www.conf]]     * [[tachtler:apache_http_server_archlinux_-_php-fpm_-_alternativer_php-interpreter#etc_php_php-fpmd_wwwconf|Apache HTTP Server ArchLinux - php-fpm - Alternativer PHP-Interpreter - /etc/php/php-fpm.d/www.conf]]
   * Setzen einer **''Location''** und des entsprechenden **''Handlers''** in der Konfugutrationsdatei   * Setzen einer **''Location''** und des entsprechenden **''Handlers''** in der Konfugutrationsdatei
-    * ''/etc/httpd/conf/extras/httpd-info.conf''+    * ''/etc/httpd/conf/extra/httpd-info.conf''
  
 ==== info-Konfiguration: /etc/httpd/conf/extra/httpd-info.conf ==== ==== info-Konfiguration: /etc/httpd/conf/extra/httpd-info.conf ====
Zeile 1017: Zeile 1023:
  
 <Location /php-fpm-status> <Location /php-fpm-status>
-    SetHandler "proxy:unix:/var/run/php-fpm-www.sock|fcgi://localhost/php-fpm-status"+    SetHandler "proxy:unix:/run/php-fpm/php-fpm-status.sock|fcgi://localhost/php-fpm-status"
     Require all granted         Require all granted    
 </Location> </Location>
Zeile 1029: Zeile 1035:
 Wendet die enthaltenen Direktiven nur auf die entsprechenden URL an. Wendet die enthaltenen Direktiven nur auf die entsprechenden URL an.
  
-  * <code apache>SetHandler "proxy:unix:/var/run/php-fpm-www.sock|fcgi://localhost/php-fpm-status"s</code>+  * <code apache>SetHandler "proxy:unix:/run/php-fpm/php-fpm-status.sock|fcgi://localhost/php-fpm-status"</code>
  
-Erzwingt die Verarbeitung aller passenden Dateien durch den Handler für [[https://php-fpm.org/|PHP-FPM]].+Erzwingt die Verarbeitung aller passenden Dateien durch den Handler für [[https://php-fpm.org/|PHP-FPM]]-Status.
  
   * <code apache>Require all granted</code>   * <code apache>Require all granted</code>
Zeile 1059: Zeile 1065:
 Mit nachfolgendem Befehl kann der Status des  abgefragt werden: Mit nachfolgendem Befehl kann der Status des  abgefragt werden:
 <code> <code>
-# systemctl status php-fpm.service+# systemctl status php-fpm.service 
 ● php-fpm.service - The PHP FastCGI Process Manager ● php-fpm.service - The PHP FastCGI Process Manager
      Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)      Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
-     Active: active (running) since Fri 2022-07-01 16:19:40 CEST; 42min ago +     Active: active (running) since Fri 2022-07-01 17:28:16 CEST; 4s ago 
-   Main PID: 457 (php-fpm) +   Main PID: 1713 (php-fpm) 
-     Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"+     Status: "Ready to handle connections"
       Tasks: 3 (limit: 7090)       Tasks: 3 (limit: 7090)
-     Memory: 31.8M +     Memory: 5.8M 
-        CPU: 271ms+        CPU: 54ms
      CGroup: /system.slice/php-fpm.service      CGroup: /system.slice/php-fpm.service
-             ├─457 "php-fpm: master process (/etc/php/php-fpm.conf)" +             ├─1713 "php-fpm: master process (/etc/php/php-fpm.conf)" 
-             ├─464 "php-fpm: pool www" +             ├─1714 "php-fpm: pool www" 
-             └─465 "php-fpm: pool www"+             └─1715 "php-fpm: pool www"
  
-Jul 01 16:19:40 vml030 systemd[1]: Starting The PHP FastCGI Process Manager... +Jul 01 17:28:16 vml030 systemd[1]: Starting The PHP FastCGI Process Manager... 
-Jul 01 16:19:40 vml030 php-fpm[457]: [NOTICE] fpm is running, pid 457 +Jul 01 17:28:16 vml030 php-fpm[1713]: [NOTICE] fpm is running, pid 1713 
-Jul 01 16:19:40 vml030 php-fpm[457]: [NOTICE] ready to handle connections +Jul 01 17:28:16 vml030 php-fpm[1713]: [NOTICE] ready to handle connections 
-Jul 01 16:19:40 vml030 systemd[1]: Started The PHP FastCGI Process Manager. +Jul 01 17:28:16 vml030 php-fpm[1713]: [NOTICE] systemd monitor interval set to 10000ms 
-Jul 01 16:19:40 vml030 php-fpm[457]: [NOTICE] systemd monitor interval set to 10000ms+Jul 01 17:28:16 vml030 systemd[1]: Started The PHP FastCGI Process Manager.
 </code> </code>
  
Zeile 1083: Zeile 1089:
 <code> <code>
 # ps auxwwwf | grep php # ps auxwwwf | grep php
-root         457  0.0  0.5  82944 21252 ?        Ss   16:19   0:00 php-fpm: master process (/etc/php/php-fpm.conf) +root        1719  0.0  0.0   7000  2552 pts/0    S+   17:28   0:00                      \_ grep php 
-http         464  0.0  0.1  82944  6352 ?        S    16:19   0:00  \_ php-fpm: pool www +root        1713  0.1  0.5  82952 21236 ?        Ss   17:28   0:00 php-fpm: master process 
-http         465  0.0  0.1  82944  6352 ?        S    16:19   0:00  \_ php-fpm: pool www +(/etc/php/php-fpm.conf) 
-root         725  0.0  0.0   7000  2676 pts/0    S+   17:02   0:00                      \_ grep php+http        1714  0.0  0.1  82948  6860 ?        S    17:28   0:00  \_ php-fpm: pool www 
 +http        1715  0.0  0.1  82948  6860 ?        S    17:28   0:00  \_ php-fpm: pool www
 </code> </code>
  
Zeile 1097: Zeile 1104:
  
 :!: **HINWEIS** - **Es erfolgen __keine__ weiteren Ausgaben, wenn der Start erfolgreich war !** :!: **HINWEIS** - **Es erfolgen __keine__ weiteren Ausgaben, wenn der Start erfolgreich war !**
-:!: **Hier geht es weiter ... / To be continued ...**+ 
 +==== info-KonfigurationTests ==== 
 + 
 +Wenn ein erneuter Neustart des [[http://httpd.apache.org|Apache HTTP Server]] erfolgreich durchgeführt wurde, können nachfolgende Abfragen mittels eines //Browsers// erfolgen, wie in nachfolgenden Bildern dargestellt durchgeführt werden: 
 + 
 +Durch anhängen nachfolgenden Zusatzes an die URL: **''/php-fpm-status''** 
 +  * [[https://www.apache.tachtler.net/php-fpm-status]] 
 +kommt eine Ansicht in etwa wie nachfolgende zur Ansicht: 
 + 
 +{{:tachtler:httpd:archlinux_apache_with_php-fpm_information_php-fpm-status.png|ArchLinux - Apache HTTP Server - Mozilla Firefox - /php-fpm-status}} 
 + 
 +Durch anhängen nachfolgenden Zusatzes an die URL: **''/php-fpm-status?full''** 
 +  * [[https://www.apache.tachtler.net/php-fpm-status?full]] 
 +kommt eine Ansicht in etwa wie nachfolgende zur Ansicht: 
 + 
 +{{:tachtler:httpd:archlinux_apache_with_php-fpm_information_php-fpm-status_full.png|ArchLinux - Apache HTTP Server - Mozilla Firefox - /php-fpm-status?full}} 
 + 
 +Durch anhängen nachfolgenden Zusatzes an die URL: **''/php-fpm-status?html''** 
 +  * [[https://www.apache.tachtler.net/php-fpm-status?html]] 
 +kommt eine Ansicht in etwa wie nachfolgende zur Ansicht: 
 + 
 +{{:tachtler:httpd:archlinux_apache_with_php-fpm_information_php-fpm-status_html.png|ArchLinux - Apache HTTP Server - Mozilla Firefox - /php-fpm-status?html}} 
 + 
 +Durch anhängen nachfolgenden Zusatzes an die URL: **''/php-fpm-status?html&full''** 
 +  * [[https://www.apache.tachtler.net/php-fpm-status?html&full]] 
 +kommt eine Ansicht in etwa wie nachfolgende zur Ansicht: 
 + 
 +{{:tachtler:httpd:archlinux_apache_with_php-fpm_information_php-fpm-status_html_full.png|ArchLinux - Apache HTTP Server - Mozilla Firefox - /php-fpm-status?html&full}} 
 + 
 +Mit nachfolgendem Befehl, kann eine einfache Datei mit **PHP** Inhalt erzeugt werden, welcher dann die bekannte PHP-Statusseite zur Anzeige bringen sollte. Hier nachfolgendes Beispiel: 
 + 
 +<code bash> 
 +# echo '<?php phpinfo(); ?>' > /srv/http/phpinfo.php  
 +</code> 
 + 
 +Anschliessend kann diese Datei dann wie folgt über z.Beinen Browser aufgerufen werden, falls dieser entsprechend konfiguriert ist. Eine Ausgabe, wie nachfolgende, sollte erscheinen: 
 +  * [[https://www.apache.tachtler.net/phpinfo.php]] 
 + 
 +{{:tachtler:httpd:archlinux_apache_phpinfo_php.png|ArchLinux - Apache HTTP Server - Mozilla Firefox - PHP-Info Abfrage}} 
 + 
 +:!: **WICHTIG** - **Es __muss__ hier die Anzeige** 
 +  * **Server-API** ''FPM/FastCGI'' 
 +**erscheinen!**
  
tachtler/apache_http_server_archlinux_-_php-fpm_-_alternativer_php-interpreter.1656687763.txt.gz · Zuletzt geändert: 2022/07/01 17:02 von klaus