allgemeine-howtos:apache:php:apache-2-und-libapache2-mod-fcgid
no way to compare when less than two revisions
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
— | allgemeine-howtos:apache:php:apache-2-und-libapache2-mod-fcgid [2016/01/20 11:11] (aktuell) – angelegt - Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== Apache 2 und libapache2-mod-fcgid ====== | ||
+ | Die Einrichtung von mod-fcgid für Apache 2.x unter Debian ist denkbar einfach, man muss nur einmal herausgefunden haben, wie es geht. Hier eine kurze aber vollständige Zusammenfassung: | ||
+ | |||
+ | <code bash> | ||
+ | |||
+ | Es empfiehlt sich, die neuere Version 2.2 von mod-fcgid zu installieren, | ||
+ | |||
+ | Die Datei /// | ||
+ | |||
+ | <code apache fcgid.conf>< | ||
+ | # IdleTimeout n (300 seconds) | ||
+ | # An idle fastcgi application will be terminated after IdleTimeout seconds. | ||
+ | | ||
+ | |||
+ | # IdleScanInterval n (120 seconds) | ||
+ | # The scan interval for idle fastcgi applications. | ||
+ | | ||
+ | |||
+ | # BusyTimeout n (300 seconds) | ||
+ | # A fastcgi application will be terminated if handing a single request | ||
+ | # longer than busy timeout. | ||
+ | | ||
+ | |||
+ | # BusyScanInterval n (120 seconds) | ||
+ | # The scan interval for busy timeout fastcgi applications. | ||
+ | | ||
+ | |||
+ | # ErrorScanInterval n (3 seconds) | ||
+ | # The scan interval for exit pending fastcgi applications. fastcgi | ||
+ | # applications will be terminated within this scanning. | ||
+ | | ||
+ | |||
+ | # ZombieScanInterval n (3 seconds) | ||
+ | # The scan interval for zombie process. | ||
+ | | ||
+ | |||
+ | # ProcessLifeTime n (3600 seconds) | ||
+ | # A fastcgi application will be terminated if lifetime expired, | ||
+ | # even no error is detected. | ||
+ | | ||
+ | |||
+ | # SocketPath path (logs/ | ||
+ | # The directory to put the UNIX domain socket. (UNIX only) | ||
+ | # This directory should be writable only by apache user | ||
+ | | ||
+ | |||
+ | # | ||
+ | #The share memory file path. (UNIX only) (version >= 2.1 only) | ||
+ | | ||
+ | |||
+ | # SpawnScoreUpLimit n (10) | ||
+ | # The spawn-speed control score up water limit. Score increases while | ||
+ | # a process is spawned or terminated, and decreases as time progresses; | ||
+ | # while the score is higher than SpawnScoreUpLimit, | ||
+ | # held for a while. The higher this number is, the higher speed of the | ||
+ | # spawning can be. | ||
+ | | ||
+ | |||
+ | # SpawnScore n (1) | ||
+ | # The weight of spawning. This weight will be plused to the spawn-control | ||
+ | # score on every spawn. The higher this number is, the lower speed of | ||
+ | # spawning can be. | ||
+ | | ||
+ | |||
+ | # TerminationScore n (2) | ||
+ | # The weight of termination. This weight will be plused to the score while | ||
+ | # fastcgi process terminates. The higher this number is, the lower speed | ||
+ | # of spawning can be. | ||
+ | | ||
+ | |||
+ | # MaxProcessCount n (1000) | ||
+ | # The max count of total fastcgi process count. | ||
+ | | ||
+ | |||
+ | # DefaultMaxClassProcessCount n (100) | ||
+ | # The maximum number of fastcgi application instances allowed to run for | ||
+ | # particular one fastcgi application. | ||
+ | | ||
+ | |||
+ | # DefaultMinClassProcessCount n (3) | ||
+ | # The minimum number of fastcgi application instances for any one fastcgi | ||
+ | # application. | ||
+ | # Idle fastcgi will not be killed if their count is less than n | ||
+ | # Set this to 0, and tweak IdleTimeout | ||
+ | | ||
+ | |||
+ | # DefaultInitEnv env_name env_value | ||
+ | # The default environment variables before a fastcgi application | ||
+ | # is spawned. You can set this configuration more than once. | ||
+ | |||
+ | # IPCConnectTimeout n (3 seconds) | ||
+ | # The connect timeout to a fastcgi application. | ||
+ | | ||
+ | |||
+ | # IPCCommTimeout n (20 seconds) | ||
+ | # The communication timeout to a fastcgi application. Please increase this | ||
+ | # value if your CGI have a slow initialization or slow respond. | ||
+ | | ||
+ | |||
+ | # OutputBufferSize n (64k bytes) | ||
+ | # CGI output cache buffer size. | ||
+ | |||
+ | # PHP_Fix_Pathinfo_Enable n(n=0/1, default 0) | ||
+ | # If you are using PHP and set cgi.fix_pathinfo=1 in php.ini, set PHP_Fix_Pathinfo_Enable 1. | ||
+ | # From php.ini: | ||
+ | # cgi.fix_pathinfo provides *real* PATH_INFO/ | ||
+ | # previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, | ||
+ | # what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting | ||
+ | # this to 1 will cause PHP CGI to fix it's paths to conform to the spec. A setting | ||
+ | # of zero causes PHP to behave as before. Default is zero. You should fix your scripts | ||
+ | # to use SCRIPT_FILENAME rather than PATH_TRANSLATED. | ||
+ | # cgi.fix_pathinfo=1 | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | |||
+ | < | ||
+ | | ||
+ | | ||
+ | Order allow,deny | ||
+ | Allow from all | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Das Modul, falls nicht schon durch die Installation erledigt, aktivieren durch manuelle Anlage der Symlinks in /// | ||
+ | |||
+ | Pro VHost eine Starter-Datei // | ||
+ | |||
+ | < | ||
+ | web001: | ||
+ | web001: | ||
+ | web002: | ||
+ | web002: | ||
+ | |||
+ | Vorangestellt hier die Besitzer und Besitzergruppen. Zusätzlich zu mod-fcgid empfiehlt sich die Verwendung von suExec, warum hier jetzt aber nicht näher eingegangen wird. | ||
+ | |||
+ | Das Verzeichnis /// | ||
+ | |||
+ | Inhalt der Starter-Datei: | ||
+ | |||
+ | <code bash php-fcgid-starter># | ||
+ | PHPRC="/ | ||
+ | export PHPRC | ||
+ | FCGI_SERVER_MAX_STDERR_LINE_LEN=2047 | ||
+ | export FCGI_SERVER_MAX_STDERR_LINE_LEN | ||
+ | exec / | ||
+ | |||
+ | Im Verzeichnis //< | ||
+ | |||
+ | // | ||
+ | |||
+ | Anpassung der VHosts: Innerhalb von //< | ||
+ | |||
+ | <code bash>< | ||
+ | FCGIWrapper / | ||
+ | Options +ExecCGI | ||
+ | </ | ||
+ | |||
+ | Das DocRoot des VHosts liegt in diesem Fall unter //< | ||
+ | |||
+ | Damit sollte alles konfiguriert sein. Die Config des Apachen reloaden mit /// | ||
+ | |||
+ | **Probleme mit 500er Fehlern nach 40 Sekunden:** | ||
+ | |||
+ | Auf der Webseite erscheint ein Error 500, im error.log des VHosts tauchen z.B. folgende Fehler auf: | ||
+ | |||
+ | < | ||
+ | |||
+ | In der hot-chilli.net Umgebung überschreiben die oben angegebenen Werte nicht die Defaultwerte aus dem Paket! Leider half weder [[http:// | ||
+ | |||
+ | **Hinweis: | ||
+ | |||
+ | **Weitere Infos:** | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | **PS:** An dieser Stelle auch herzlichen Dank an cirox aus dem Rootforum. ;-) |
allgemeine-howtos/apache/php/apache-2-und-libapache2-mod-fcgid.txt · Zuletzt geändert: 2016/01/20 11:11 von 127.0.0.1