Guides tagged “nginx”

Step-by-step MdmHost guides about nginx, sorted A-Z.

112 guides · page 2 of 6

  • Docker Compose for WordPress: Nginx, PHP-FPM and MariaDB

    Build a WordPress stack with Docker Compose using separate Nginx, PHP-FPM and MariaDB containers, a persistent wp-content volume and a free Let's Encrypt certificate.

    IntermediateLinux server6 min read
  • Enable Brotli compression in Nginx

    Add Brotli compression to Nginx with the packaged dynamic modules on Ubuntu 24.04 and Debian 12, keep gzip as a fallback, and confirm browsers receive br encoding.

    IntermediateLinux server5 min read
  • Enable gzip compression in Nginx

    Turn on gzip in Nginx so HTML, CSS, JavaScript and JSON are sent compressed, choose sensible types and levels, and confirm it works with curl.

    BeginnerLinux server4 min read
  • Enable HTTP/3 and QUIC in Nginx (with HTTP/2 fallback)

    Turn on HTTP/3 in Nginx 1.25+: check your build, add QUIC listeners on UDP 443, advertise with Alt-Svc, open the firewall and confirm browsers really switch to h3.

    AdvancedLinux VPS3 min read
  • Enable NGINX with reverse proxy on cPanel

    Install cPanel's ea-nginx as a caching reverse proxy in front of Apache, control caching per account, clear the cache and fix 502 Bad Gateway errors.

    AdvancedLinux server4 min read
  • Event-driven vs process-based web servers: how they handle connections

    Why Nginx, LiteSpeed and Caddy handle thousands of connections with little memory while classic Apache needs a process or thread each: the C10k problem, event loops, epoll and what it means for you.

    IntermediateAll hosting3 min read
  • Fix "413 Request Entity Too Large" on uploads

    Fix 413 errors when uploading files: raise client_max_body_size in Nginx, LimitRequestBody in Apache, PHP upload limits, and proxy or CDN limits in front of the server.

    BeginnerLinux VPS3 min read
  • Fix "Too many open files" errors on Linux

    Understand file descriptor limits, check what a process is allowed and using, and raise limits correctly for systemd services, Nginx, MySQL, Node.js and user sessions.

    IntermediateLinux VPS3 min read
  • Fix 403 Forbidden in Nginx

    Nginx returns 403 Forbidden when it will not serve a file or folder. Work through the usual causes, from a missing index file to permissions, deny rules and SELinux.

    BeginnerLinux server5 min read
  • Fix 500 Internal Server Error for PHP sites on a VPS

    Track down a PHP 500 Internal Server Error on your own Nginx or Apache server: read the right logs, then fix fatal errors, permissions, .htaccess, FPM and SELinux causes.

    IntermediateLinux VPS3 min read
  • Fix 502 Bad Gateway errors with Nginx and PHP-FPM

    Diagnose 502 Bad Gateway on PHP sites: PHP-FPM down or crashing, wrong socket path or permissions, exhausted workers, oversized headers and upstream timeouts.

    IntermediateLinux VPS3 min read
  • Fix 502 Bad Gateway in Nginx

    A 502 Bad Gateway means Nginx could not get a valid answer from PHP-FPM or your app. Read the error log, then check the backend service, socket path, permissions and ports.

    IntermediateLinux server5 min read
  • Fix 504 Gateway Timeout errors on Nginx, PHP and app servers

    Find why a request times out with 504 Gateway Timeout: slow PHP or database queries, mismatched proxy and FPM timeouts, CDN limits, and when to raise timeouts versus fix the code.

    IntermediateLinux VPS3 min read
  • Fix 504 Gateway Timeout in Nginx

    A 504 Gateway Timeout means PHP or your app took longer to answer than Nginx was willing to wait. Find the slow request, raise the right timeouts consistently, and fix the root cause.

    IntermediateLinux server5 min read
  • Fix CORS errors: "No 'Access-Control-Allow-Origin' header"

    Understand browser CORS errors when a frontend calls an API on another domain, and fix them correctly in the app, Nginx or Apache, including preflight requests and credentials.

    IntermediateLinux VPS · cPanel hosting3 min read
  • Fix ERR_TOO_MANY_REDIRECTS: diagnose a redirect loop

    Trace an ERR_TOO_MANY_REDIRECTS loop across Nginx, Apache, WordPress and Cloudflare, and find the single rule that keeps sending traffic back to itself.

    IntermediateLinux server7 min read
  • Fix Nginx 404 errors with try_files for pretty URLs

    Pretty URLs return 404 on Nginx when nothing routes them to your app. Add the right try_files line for WordPress, Laravel or a single-page app, and avoid root and alias mistakes.

    BeginnerLinux server4 min read
  • Fix Nginx 413 Request Entity Too Large

    Nginx returns 413 Request Entity Too Large when an upload is bigger than client_max_body_size. Raise the limit for one site or the whole server, match PHP's limits, and test.

    BeginnerLinux server5 min read
  • Fix Nginx failed to start: address already in use

    Nginx will not start when another program already holds port 80 or 443. Find what is using the port with ss, stop or move it, fix duplicate listen lines, then start Nginx.

    BeginnerLinux server5 min read
  • Forward proxy vs reverse proxy vs load balancer

    The difference between a forward proxy, a reverse proxy and a load balancer, what each is used for, real examples like Squid, Nginx, HAProxy and Cloudflare, and how they combine.

    BeginnerServers and networking3 min read

Browse by topic

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.