Mirki jak zrobić automatyczne przekierowanie z http do https? Oczywiście jako #cebula korzytsam z darmowego ssl od cloudflare.
server {
listen 80;
server_name ~^(.*)\.xd\.pl$ ;
charset utf-8;
root /var/www/xd/public;
access_log /var/www/xd/app/storage/logs/access.log;
error_log /var/www/xd/app/storage/logs/error.log;
rewrite_log on;
index index.php;
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# PHP FPM configuration.
location ~ \.php$
mam taki serwer:
Intel Xeon E3 1225v2 3.2 GHz+
ram 32 GB
3x 120 GB SSD
serwer na nginx
jaki config proponujecie dla php-fpm ?
obecnie uzywam takiego:
PHP-FPM pm.max_children = 100
PHP-FPM pm.start_servers = 20
PHP-FPM pm.min_spare_servers = 10
PHP-FPM pm.max_spare_servers = 50
PHP-FPM pm.max_requests = 5000
i wywala czasem error:
WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning
Proponuję:
- przygotować środowisko testowe [aplikacja która będzie na tym serwerze],
- przygotować benchmark - obciążyć serwer i mierzyć CPU/IO/ilość requestów,
- zmieniać parametry i obserwować wyniki
-