Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste ÜberarbeitungBeide Seiten der Revision
content:apache_phpfpm [2021/10/14 14:42] – [Howto setup a LAMP-Server in 2018-2020] Danielcontent:apache_phpfpm [2022/03/02 18:39] – [Tell Apache to use php-fpm] Daniel
Zeile 222: Zeile 222:
  
   * To enable this and all its dependencies, use   * To enable this and all its dependencies, use
-<code> 
  
-sudo a2enmod setenvif rewrite proxy proxy_fcgi+<code> 
 +sudo a2enmod setenvif 
 +sudo a2enmod rewrite 
 +sudo a2enmod proxy 
 +sudo a2enmod proxy_fcgi
  
 </code> </code>
Zeile 235: Zeile 238:
 # Don't use "ProxyPassMatch", while non-ascii-urls will not work! # Don't use "ProxyPassMatch", while non-ascii-urls will not work!
 # This is to forward all PHP to php-fpm # This is to forward all PHP to php-fpm
- <FilesMatch \.php$> +<FilesMatch \.php$> 
-   SetHandler "proxy:unix:/var/run/php-fpm/php-fpm.sock|fcgi://localhost/" +  SetHandler "proxy:unix:/var/run/php-fpm/php-fpm.sock|fcgi://localhost/" 
- </FilesMatch>+</FilesMatch> 
 +DirectoryIndex index.php
  
 # Don't use "Reuse" cause of timeouts and php-fpm manages reuse of php automagically! # Don't use "Reuse" cause of timeouts and php-fpm manages reuse of php automagically!
 # <Proxy fcgi://localhost enablereuse=on max=10> # <Proxy fcgi://localhost enablereuse=on max=10>
- <Proxy fcgi://localhost> +<Proxy fcgi://localhost> 
-    #6 Hours = 21600 +   #6 Hours = 21600 
-    #Make this high, as upload will stop after that amount of time +   #Make this high, as upload will stop after that amount of time 
-    ProxySet connectiontimeout=30 timeout=21600 +   ProxySet connectiontimeout=30 timeout=21600 
- </Proxy>+</Proxy>
  
- # If the php file doesn't exist, disable the proxy handler. +# If the php file doesn't exist, disable the proxy handler. 
- # This will allow .htaccess rewrite rules to work and +# This will allow .htaccess rewrite rules to work and 
- # the client will see the default 404 page of Apache +# the client will see the default 404 page of Apache 
- RewriteCond %{REQUEST_FILENAME} \.php$ +RewriteCond %{REQUEST_FILENAME} \.php$ 
- RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-f +RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-f 
- RewriteRule (.*) - [H=text/html]+RewriteRule (.*) - [H=text/html]
  
 </code> </code>
 +
  
 ==== Start and check Apache ==== ==== Start and check Apache ====
  • content/apache_phpfpm.txt
  • Zuletzt geändert: 2023/10/01 10:24
  • von Daniel