HTTP 502
5xx Sunucu Hatası
HTTP 502: Bad Gateway (Geçersiz Ağ Geçidi)
Nginx veya Apache ters proxy olarak çalışırken, arkasındaki backend servisinden (PHP-FPM, Node.js, Python Gunicorn) geçersiz bir yanıt aldı.
⚠️ HTTP 502 Neden Meydana Gelir?
PHP-FPM servisinin çökmesi, socket yolunun bulunamaması veya backend sunucusunun kapalı olması.
🛠️ Nasıl Çözülür ve Düzeltilir?
PHP-FPM servis durumunu kontrol edin: `sudo systemctl status php8.4-fpm` veya `sudo systemctl restart php8.4-fpm`.
Sunucu Yapılandırma (Nginx / Web):
# PHP-FPM FastCGI Bağlantısı
location ~ \.php$ {
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
cURL Test Komutu:
curl -i https://bilgiseli.net/