π΄ 1) 502 Bad Gateway β How to Fix It (Nginx + PHP-FPM)
β
Featured Snippet Answer
502 Bad Gateway happens when Nginx canβt communicate with PHP-FPM.
Fix it by restarting PHP-FPM, matching PHP versions, checking socket paths, increasing timeouts, and ensuring PHP-FPM is running.
β
π Common Causes
PHP-FPM service stopped or crashed
PHP version mismatch (Nginx β PHP socket)
Incorrect fastcgi_pass path
Low memory / no swap on VPS
PHP scripts timing out
β
π οΈ Step-by-Step Fix
Step 1 β Restart PHP-FPM (FIRST)
$$
service php-fpm restart
or
service php8.2-fpm restart
$$
Step 2 β Check PHP-FPM status
$$
systemctl status php8.2-fpm
$$
If itβs inactive or failed, thatβs your problem.
β
Step 3 β Match Nginx socket to PHP version
Check PHP socket:
$$
ls /run/php/
$$
Example correct config:
$$
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
$$
Mismatch = 502.
β
Step 4 β Increase PHP timeout (heavy scripts)
Edit php.ini:
$$
max_execution_time = 120
memory_limit = 512M
$$
Restart PHP-FPM again.
β
Step 5 β Add swap (1GB VPS FIX)
$$
fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
$$
β
π Summary
Error: 502 Bad Gateway
Cause: PHP-FPM not responding
Fix: Restart PHP-FPM, fix socket, add swap
Category: Technology & Computing β Web Development
Hashtags:
#502error #nginx #phpfpm #vps #serveradmin
β
β
π 2) 403 Forbidden β Permissions Explained (Linux, Nginx, Apache)
β
Featured Snippet Answer
403 Forbidden means the server refuses access due to permissions or rules.
Fix it by correcting file permissions, ownership, web server rules, and security modules.
β
π Common Causes
Wrong file/folder permissions
Wrong ownership (root instead of web user)
Missing index.php or index.html
.htaccess or Nginx deny rules
SELinux / security modules
β
π οΈ Correct Permissions (SAFE DEFAULT)
Folders
$$
find /site/path -type d -exec chmod 755 {} \;
$$
Files
$$
find /site/path -type f -exec chmod 644 {} \;
$$
β
Correct Ownership (VERY IMPORTANT)
$$
chown -R www-data:www-data /site/path
$$
(or nginx:nginx depending on server)
β
π§ͺ Quick Test
If this fixes it instantly β permissions were the issue.
β
π Summary
Category: Technology & Computing β Web Development
Hashtags:
#403error #permissions #linux #webserver #hosting
β
β
π 3) ERR_SSL_VERSION_OR_CIPHER_MISMATCH β Fix SSL Properly
β
Featured Snippet Answer
ERR_SSL_VERSION_OR_CIPHER_MISMATCH occurs when the browser and server donβt share compatible SSL/TLS settings.
Fix it by updating SSL certificates, enabling modern TLS versions, and disabling outdated ciphers.
β
π Common Causes
β
π οΈ Step-by-Step Fix
Step 1 β Renew SSL certificate
If using Letβs Encrypt:
$$
certbot renew
$$
β
Step 2 β Enable modern TLS (Nginx)
$$
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
$$
Reload Nginx:
$$
nginx -s reload
$$
β
Step 3 β Cloudflare users
Set:
$$
SSL Mode: Full (strict)
$$
β Do not use Flexible SSL.
β
π Summary
Error: SSL version/cipher mismatch
Cause: Outdated TLS or certificate
Fix: TLS 1.2+, renew cert
Category: Internet, Apps & Social Media β Websites & Platforms
Hashtags:
#ssl #tls #cloudflare #https #security
β
β
π§ 4) WEBSITE ERRORS HUB β π SEO POWERHOUSE (PIN THIS)
This is your traffic magnet + internal linking engine.
β
π Website Errors & Fixes β Start Here
If your website is down, broken, or showing strange errors, this hub links to clear, step-by-step solutions.
π DNS Errors
β
π SSL & Security Errors
β
π Redirect & Access Errors
β
βοΈ Server & Backend Errors
π 502 Bad Gateway β Nginx + PHP-FPM Fix
π 503 Service Unavailable β Server Overload Fix
π 504 Gateway Timeout β Slow Backend Fix
β
π§° PHP & Composer Errors
π Composer Error: Call to Undefined Function putenv()
π PHP Fatal Error: Declaration Must Be Compatible
π Composer Memory Exhausted β Fix
β
π― Why This Hub RANKS
β
Acts as a topic authority page
β
Strong internal linking
β
Low bounce rate
β
Easy crawling for Google
β
Users bookmark it
π Pin this globally.
β
π What You Should Do Next (VERY IMPORTANT)
Publish all individual error posts
Publish the Website Errors Hub
Add internal links both ways
Pin the hub
Keep adding new errors under it