Le 08/04/2015 22:45, Ben Harper a écrit :
Greetings,
We have received a github issue[0] regarding our apcu-panel packages and
the need for Apache. Currently, our apcu-panel packages require mod_php
and thus Apache. The package provides web files for apcu and the Apache
configuration to use those web files. With the growth in popularity of
Nginx and other web servers, should our apcu-panel still follow Red
Hat's example and require Apache? Myself and Carl George have been
thinking about this issue topic and wanted to see if their might be
other solutions. If you have an idea or feel strong about how we
proceed, please reply to this email or the github issue.
This issue have be fixed in Fedora 21+
In fact, various issues
- httpd + mod_php works out-of-the-box (since the beginning)
- drop dependency on "php" for all php libraries
(pure php requires php(language), C extension requires php(api), long
work started years ago)
- make httpd + php-fpm to work
- make nginx + php-fpm tp work
- make any web-app to work with httpd or nginx
- switch fpm to listen on UDS with correct ACL for httpd and nginx (not
mandatory but better for security, done in F22+)
The current solution imply
- split /etc/httpd directory + apache user out from httpd into
httpd-filesystem
- split /etc/nginx directory out from nginx into nginx-filesystem
- add a /etc/nginx/default.d to drop configuration file in
- add virtual provides php(http) in modd_php and php-fpm
- php-fpm provides, for apache
/etc/httpd/conf.d/php.conf (with condition on mod_php)
- php-fpm provides for nginx
/etc/nginx/conf.d/php-fpm.conf
/etc/nginx/default.d/php.conf
- rely on FPM running on the "apache" account (it already inherits the
SELinux content from apache), mandatory for webapp and writable directories.
Some webapp already take benefit of this change (phpMyAdmin, GLPI,
roudcubemail, ...)
A webb app simply requires
- webserver
- php(http)
- http-filesystem
- nginx-filesystem
and provides
- /etc/httpd/conf.d/phpMyAdmin.conf
- /etc/nginx/default.d/phpMyAdmin.conf
There is a long road to fix all packaged webapps, and for now, I think
we need more feedback. But it works.
I don't see a simple way to backport all this changes in EL-7, but
everything is ready for EL-8 ;)
And APCU panel is probably not a good example, this is a single PHP file
which can be installed easily...
Dropping dependency on httpd/mod_php is possible in a simple way, just
have to own the /etc/httpd/conf.d dir to avoid unowned dir. But it won't
work with nginx.
Remi.
PHP developer and packager
-Ben and the rest of the IUS covedev team
[0] https://github.com/iuscommunity-pkg/php55u-pecl-apcu/issues/2