NGINX
Augmenter la taille des post et des upload pour NGINX/PHP
- post_max_size
grep -ir post_max_size /etc/php5/fpm/*
# Output:
/etc/php5/fpm/php.ini:post_max_size = 16M
- client_max_body_size
grep -ir client_max_body_size /etc/nginx/*
# Output:
/etc/nginx/nginx.conf: client_max_body_size 16M;
/etc/nginx/sites-available/dev1.zone.example.com: client_max_body_size 16M;
- upload_max_filesize
grep -ir upload_max_filesize /etc/php5/*
# Output:
fpm/php.ini:upload_max_filesize = 10M
- Reload des services
service php-fpm reload
service nginx reload
Add a module
apt-get install php5-imap
php5enmod imap
#ln -s ../../mods-available/imap.ini 20-imap.ini
service php5-fpm restart
service nginx restart
- Configurer php-fpm
vim /etc/php5/fpm/pool.d/wwww.conf
:
; Default Value: not set
pm.status_path = /status #<- Décommenter cette ligne.
- Vérifier la config :
php5-fpm -t
- Redémarrer le service :
service php5-fpm restart
- Ajouter dans la config ngninx de votre site
vim /etc/nginx/sites-available/www.site.com
:
location ~ ^/(status|ping)$ {
allow 10.25.7.0/24;
allow 127.0.0.1;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9013;
}
- Vérifier la config :
nginx -t
- Redémarrer le service ngninx :
service nginx restart
$remote_addr - $remote_user - [$time_local] "$request" $status $bytes_sent "$http_referer" "$http_user_agent" "$gzip_ratio"