"Force HTTPS with a PHP/.htaccess redirect"
If you're doing the http→https redirect in PHP or app middleware, every plain-http hit boots a full FPM worker just to send a 301. Bots hammer http://; you're burning workers on redirects.
Do it in nginx before PHP ever wakes:
server { listen 80; return 301 https://$host$request_uri; }
Now the redirect costs nothing — nginx answers in microseconds, FPM never spins up. Move it down the stack. Try it tonight.
Root Access Daily
@RootAccessDaily
"Force HTTPS with a PHP/.htaccess redirect"
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.