Guides tagged “nginx”
Step-by-step MdmHost guides about nginx, sorted A-Z.
112 guides · page 5 of 6
OCSP stapling explained: what it is and how to enable it
How certificate revocation checking works, what OCSP stapling does, its current status as some CAs phase out OCSP, and how to enable and test it on Nginx and Apache.
Password protect a site or folder in Nginx and Apache with htpasswd
Add HTTP Basic authentication to a staging site, admin area or folder: create an htpasswd file with bcrypt, configure Nginx auth_basic or Apache AuthType Basic, and combine it with IP allow lists.
Password protect a site or folder with Nginx basic auth
Add a username and password prompt to a whole site, a staging copy or an admin folder with Nginx basic auth, and let trusted IPs through without a password.
PHP-FPM pools per site: isolate websites with separate users and sockets
Create one PHP-FPM pool per website so each runs as its own Linux user with its own socket, limits and settings, then connect the pools to Nginx or Apache and verify isolation.
Protect Nginx with Fail2ban: bad bots, scanners and auth
Turn on Fail2ban's built-in Nginx jails to ban password guessers, vulnerability scanners and clients that hit your rate limits, then test each filter against your real logs.
Proxy WebSocket connections through Nginx
Make WebSockets work behind Nginx by passing the Upgrade and Connection headers, using a map for connection_upgrade, raising read timeouts, and testing the socket.
Proxy WebSockets through Nginx: Upgrade headers, timeouts and scaling
Configure Nginx to proxy WebSocket connections for chat, live dashboards and Socket.IO apps: the Upgrade and Connection headers, long read timeouts, sticky sessions and debugging failed handshakes.
Put a Node.js app behind Nginx, Apache or LiteSpeed (reverse proxy)
Serve a Node.js app on port 80/443 by proxying a domain to it with Nginx, Apache or OpenLiteSpeed, including headers, WebSocket support and testing.
Rate limit requests in Nginx with limit_req
Slow down brute-force logins, scrapers and API abuse with Nginx limit_req and limit_conn, using burst and nodelay so real visitors are not affected.
Read and manage Nginx access and error logs
Find Nginx's access and error logs, understand each line, give every site its own log, set error_log levels, pull out top IPs and URLs, and keep logs rotated.
Redirect HTTP to HTTPS in Nginx
Send every plain HTTP visitor to the secure HTTPS version of your site with one return 301 in Nginx, while keeping Let's Encrypt renewals working and avoiding redirect loops.
Redirect www to non-www (or the reverse) in Nginx
Pick one hostname for your site and send every other version to it with a clean 301 redirect in Nginx, keeping HTTPS and the full request path.
Run a Node.js app with Docker Compose behind Nginx
Containerise a Node.js app with a small Dockerfile, run it with Docker Compose next to an Nginx reverse proxy, and add logs, restarts and HTTPS.
Run Nginx in front of Apache: the hybrid reverse proxy setup
Put Nginx on ports 80/443 to handle TLS, static files and slow clients while Apache on 8080 keeps .htaccess support for PHP apps. Config, real IP forwarding and when this is worth it.
Secure Nginx with a free Let's Encrypt SSL certificate
Install Certbot, issue a free certificate for your domain, redirect HTTP to HTTPS and make sure renewal runs on its own.
Serve static files fast with Nginx: sendfile, open_file_cache and caching headers
Tune how Nginx serves images, CSS, JS and downloads: sendfile, tcp_nopush, open_file_cache, expires and Cache-Control, precompressed files, large downloads and avoiding needless logging.
Set browser caching headers (expires and Cache-Control) in Nginx
Tell browsers how long to keep images, CSS, JavaScript and fonts with expires and Cache-Control in Nginx, while making sure HTML stays fresh after every update.
Set up mutual TLS (client certificate authentication) on Nginx
Protect admin panels and APIs with mutual TLS: create a private CA with OpenSSL, issue client certificates, require them in Nginx, pass identity to the app and revoke access.
Set up Nginx as a reverse proxy for any backend app
Put Nginx in front of a Node.js, Python, Go or Java app running on a local port, forward the right headers, tune timeouts and buffering, and add free HTTPS.
Set up Nginx as a reverse proxy on a Linux server
Install Nginx on Ubuntu or AlmaLinux and configure it as a reverse proxy for an app on a local port, with correct headers, WebSocket support and free HTTPS from Let's Encrypt.
Browse by topic
- Getting startedYour first hour with a new server: access, logins and basics.83 guides
- cPanelFiles, databases, email, domains and every cPanel tool, step by step.67 guides
- WHM & resellingWHM, packages, reseller accounts, WHMReseller and running a hosting brand.53 guides
- WordPressInstall, secure, speed up, migrate and fix WordPress sites.49 guides
- Email & webmailMailboxes, webmail, forwarders, spam filters and email delivery.67 guides
- DomainsRegistering, transferring and managing domains and nameservers.27 guides
- SSL certificatesFree AutoSSL, Let's Encrypt, paid certificates and HTTPS.41 guides
- CloudLinuxCloudLinux setup and use: LVE limits, CloudLinux Manager, CageFS and PHP/Node.js selectors.31 guides
- LiteSpeedLiteSpeed Web Server, LSCache and the LiteSpeed Cache plugin: install, settings and tuning.35 guides
- Imunify360Malware scanning, firewall and proactive defence with Imunify360.24 guides
- SoftaculousInstall, update, clone and back up apps with Softaculous.24 guides
- WP SquaredcPanel's WordPress platform: sites, plugins, staging and backups.9 guides
- SitePadBuild and publish websites with the SitePad builder.9 guides
- SitejetDesign, edit and publish sites with the Sitejet builder.9 guides
- WHMResellerAlpha and master resellers with WHMReseller: install, setup and use.12 guides
- VirtFusionInstall, set up and manage VirtFusion: hypervisors, packages, servers and WHMCS integration.28 guides
- VirtualizorManage your VPS with Virtualizor: power, OS reinstall, VNC, IPs and backups.44 guides
- PleskWebsites, email, databases and settings in the Plesk panel.53 guides
- DirectAdminUsers, domains, email and reseller tools in DirectAdmin.41 guides
- WHMCSBilling, automation, products and client management with WHMCS.52 guides
- Control panelscPanel & WHM, Plesk, DirectAdmin and other panels on your VPS.107 guides
- SecurityKeys, passwords, firewalls and keeping a server patched.138 guides
- Networking & DNSIP addresses, reverse DNS, ports and traffic.72 guides
- Websites & appsWeb servers, WordPress, PHP, Node.js, SSL and app hosting.83 guides
- DatabasesMySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.80 guides
- Billing & accountInvoices, renewals, the client area and your account.9 guides
- TroubleshootingWhen something is not working: checks and fixes.127 guides
- Linux VPSSSH, packages, services and everyday Linux administration.265 guides
- Windows VPS & RDPRemote Desktop, Windows Server settings and Admin RDP tips.73 guides
- Docker & DevOpsContainers, Git deploys, automation, monitoring and backups.82 guides
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.
