Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung | Nächste ÜberarbeitungBeide Seiten der Revision | ||
content:apache_phpfpm [2020/04/03 16:07] – [PHP Configuration] Daniel | content:apache_phpfpm [2020/04/05 18:26] – [Tell Apache to use php-fpm] Daniel | ||
---|---|---|---|
Zeile 113: | Zeile 113: | ||
sudo zypper install php7-fpm | sudo zypper install php7-fpm | ||
- | |||
- | </ | ||
- | * Than, install mod_fcgi - it is used to tunnel request to php-fpm: | ||
- | |||
- | < | ||
- | sudo zypper install apache2-mod_fcgid | ||
- | sudo a2enmod proxy proxy_fcgi setenvif | ||
</ | </ | ||
Zeile 141: | Zeile 134: | ||
* pm.min_spare_servers = 6 | * pm.min_spare_servers = 6 | ||
* pm.max_spare_servers = 18 | * pm.max_spare_servers = 18 | ||
+ | |||
==== PHP Configuration ==== | ==== PHP Configuration ==== | ||
Zeile 158: | Zeile 152: | ||
=== About PHP- Modules === | === About PHP- Modules === | ||
- | many modules for PHP are offered in the Distrubution. I **would not recommend using those** - as they need to be compiled against your php. If you update PHP and your modules are the same, they may brake your PHP. Better use pearl / pecl and install modules with it! | + | many modules for PHP are offered in the Distrubution. I **would not recommend using those** - as all php-modules |
- | And again don' | + | Better |
- | and see [[https://www.php.net/manual/en/install.pecl.intro.php|https:// | + | For me, i needed: php-pear, php-pecl, php7-devel (for command phpize) |
+ | |||
+ | Which can be found in the Repo: [[https://build.opensuse.org/project/show/devel: | ||
+ | |||
+ | After that, modules can be installed by e.g. "pecl install imagick" | ||
+ | |||
+ | Restart | ||
===== Tell Apache to use php-fpm ===== | ===== Tell Apache to use php-fpm ===== | ||
- | After php-fpm | + | For making Apache use php-fpm |
+ | |||
+ | Caution: this has noting to do with "mod_fcgi"! You will not need mod_fcgi, as this would manage php itself in a new server, which we dont' want! " | ||
+ | |||
+ | * To enable this and all its dependencies, | ||
+ | |||
+ | < | ||
+ | sudo a2enmod setenvif rewrite proxy proxy_fcgi | ||
+ | |||
+ | </ | ||
+ | |||
+ | Now, tell proxy_fcgi to use php: | ||
- | * Edit / | + | * Create |
< | < | ||
Zeile 194: | Zeile 205: | ||
</ | </ | ||
+ | ===== Start and check Apache ===== | ||
Now you can start and enable apache2 | Now you can start and enable apache2 | ||
Zeile 202: | Zeile 214: | ||
</ | </ | ||
+ | |||
+ | check if the modules have beend loaded: | ||
+ | |||
+ | apache2ctl -M | ||
+ | |||
+ | This should include proxy_fcgi_module now. | ||
You are done. Now its up to you to fill Apache with content. Have fun! | You are done. Now its up to you to fill Apache with content. Have fun! | ||