Création du dossier spécifique :
mkdir /var/www/tmp
chown www-data.www-data
Configuration du PHP de Apache :
/etc/php/7.3/apache2/php.ini b/php/7.3/apache2/php.ini
; http://php.net/upload-tmp-dir
;upload_tmp_dir =
+upload_tmp_dir = /var/www/tmp
; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
-upload_max_filesize = 2M
+upload_max_filesize = 2048M
Revue des configurations open_basedir :
(April) root@lamp:/etc/apache2/sites-enabled[master*$]# grep open_basedir * |grep "/tmp"
apr1.org.conf: php_admin_value open_basedir "/var/www/apr1.org:/tmp"
photos.april.org.conf: php_admin_value open_basedir "/var/www/photos.april.org/:/tmp"
valise.april.org.conf: php_admin_value open_basedir "/var/www/valise.april.org:/var/www/valise-data:/var/www/valise-data/tmp:/var/www/media.april.org/audio/radio-cause-commune/libre-a-vous/emissions/:/tmp"
Enrichissement des sites identifiés :
/etc/apache2/sites-available/apr1.org.conf
- php_admin_value open_basedir "/var/www/apr1.org:/tmp"
+ php_admin_value open_basedir "/var/www/apr1.org:/tmp:/var/www/tmp"
/etc/apache2/sites-available/photos.april.org.conf
- php_admin_value open_basedir "/var/www/photos.april.org/:/tmp"
+ php_admin_value open_basedir "/var/www/photos.april.org/:/tmp:/var/www/tmp"
/etc/apache2/sites-available/valise.april.org.conf
- php_admin_value open_basedir "/var/www/valise.april.org:/var/www/valise-data:/var/www/valise-data/tmp:/var/www/media.april.org/audio/radio-cause-commune/libre-a-vous/emissions/:/tmp"
+ php_admin_value open_basedir "/var/www/valise.april.org:/var/www/valise-data:/var/www/valise-data/tmp:/var/www/media.april.org/audio/radio-cause-commune/libre-a-vous/emissions/:/tmp:/var/www/tmp"
Fait.