I just upgraded my apache2 server on Debian 9.13 Stretch to start using HTTP/2. As far as I'm concerned, that requires switching from mod_php to PHP-FPM.
The problem is that PHP-FPM does not obey certain apache directives from .htaccess. For instance, I've been using php_value upload_max_filesize 900M
in the an .htaccess file at the upload directory, to increase the filesize and other related parameters like max_execution_time
and post_max_size
in a finer grain than using the global php.ini file.
These are some of the alternatives I already tried:
- Using PHP
ini_set()
method:post_max_size
andupload_max_filesize
are used before my script is started. - Using .user.ini override files: less than ideal, since it would require restricting the upload of .ini files in every single place that allows to upload stuff (I can use a
<Files>
filter to disable read access, but not uploading). - Renaming the .user.ini file to
SOME_SCRAMBLED_TEST.ini
and adding a Require all denied to such files: dangerous, since a single phpscandir
at the wrong place may reveal my secured-by-obscurity config. - Changing it in the php.ini script: would take this as the last option; I prefer to have a rather high upload size than allowing users to upload a .user.ini file that screw my server.
Is there any other alternative to use HTTP/2 and have a secure server that allows uploads?