Guides tagged “linux”
Step-by-step MdmHost guides about linux, sorted A-Z.
280 guides · page 10 of 14
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.
Protect SSH from brute-force attacks with Fail2ban
Install Fail2ban, create a safe jail.local for SSH, check which addresses are banned and unban yourself if you mistype a password too often.
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.
Push images to Docker Hub or GitHub Container Registry
Publish your own Docker images to Docker Hub or GitHub Container Registry. Log in with access tokens, tag images properly, keep them private and pull them on your VPS.
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.
Rate-limit SSH and other ports with ufw limit
Use ufw limit to slow down SSH brute-force attempts. Learn how the 6-connections-in-30-seconds rule works, apply it to a custom SSH port, pair it with Fail2ban and test it.
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.
Reinstall the operating system on a Virtualizor VPS
Reinstall your VPS with a new OS template such as AlmaLinux, Ubuntu, Debian or Windows in Virtualizor, set the root password, and know what to back up first.
Repair Corrupted MySQL InnoDB Tables on a Linux VPS
Confirm InnoDB corruption with CHECK TABLE, start MySQL with innodb_force_recovery to dump readable data, then rebuild the tables from that dump.
Reset a Forgotten MySQL Root Password on Linux
Recover access to MySQL or MariaDB on a Linux VPS by starting the server with skip-grant-tables, setting a new root password and restarting normally.
Restore a single file or folder from a restic snapshot
Find the right restic snapshot, restore just one file or directory to a temporary path, and put it back in place without running a full restore.
Roll back a bad deploy using Docker image tags
Tag every release, pin the version in your Compose file, and switch back to the previous image when a deploy breaks production. Includes verification and rollback of the database step.
Run a Discord Bot 24/7 on a VPS with Docker
Keep your Discord bot online around the clock by packaging it in a Docker image, passing the token as an environment variable and letting a restart policy bring it back after crashes or reboots.
Run a private Docker registry on your VPS
Host your own private Docker registry with the official registry image. Add TLS through a reverse proxy and basic auth, push and pull images, run garbage collection and size the storage.
Run a Telegram bot with Docker and auto-restart it
Containerise a Telegram bot, keep it running with a Docker restart policy, and read the logs when something breaks.
Run Docker in rootless mode on Ubuntu
Set up Docker rootless mode on Ubuntu so the daemon and containers run as a normal user. Covers the setup tool, the user systemd service, ports below 1024, storage and the trade-offs.
Run PHP-FPM with Apache using proxy_fcgi and mpm_event
Move Apache from mod_php and the prefork MPM to PHP-FPM with mpm_event and proxy_fcgi. Use less memory, serve more visitors and pick a PHP version per virtual host.
Schedule restic backups with systemd timers on a Linux VPS
Create a restic backup script, a oneshot systemd service and a timer unit so your Linux VPS backs itself up on a fixed schedule, with logs you can read in journalctl.
Browse by topic
- Getting startedYour first hour with a new server: access, logins and basics.69 guides
- cPanelFiles, databases, email, domains and every cPanel tool, step by step.37 guides
- WHM & resellingWHM, packages, reseller accounts, WHMReseller and running a hosting brand.49 guides
- WordPressInstall, secure, speed up, migrate and fix WordPress sites.40 guides
- Email & webmailMailboxes, webmail, forwarders, spam filters and email delivery.37 guides
- DomainsRegistering, transferring and managing domains and nameservers.20 guides
- SSL certificatesFree AutoSSL, Let's Encrypt, paid certificates and HTTPS.19 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.30 guides
- Imunify360Malware scanning, firewall and proactive defence with Imunify360.23 guides
- SoftaculousInstall, update, clone and back up apps with Softaculous.23 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.7 guides
- VirtualizorManage your VPS with Virtualizor: power, OS reinstall, VNC, IPs and backups.30 guides
- PleskWebsites, email, databases and settings in the Plesk panel.52 guides
- DirectAdminUsers, domains, email and reseller tools in DirectAdmin.40 guides
- WHMCSBilling, automation, products and client management with WHMCS.51 guides
- Control panelscPanel & WHM, Plesk, DirectAdmin and other panels on your VPS.106 guides
- SecurityKeys, passwords, firewalls and keeping a server patched.115 guides
- Networking & DNSIP addresses, reverse DNS, ports and traffic.34 guides
- Websites & appsWeb servers, WordPress, PHP, Node.js, SSL and app hosting.52 guides
- DatabasesMySQL, MariaDB, PostgreSQL, Redis and MongoDB on a VPS.64 guides
- Billing & accountInvoices, renewals, the client area and your account.9 guides
- TroubleshootingWhen something is not working: checks and fixes.68 guides
- Linux VPSSSH, packages, services and everyday Linux administration.70 guides
- Windows VPS & RDPRemote Desktop, Windows Server settings and Admin RDP tips.58 guides
- Docker & DevOpsContainers, Git deploys, automation, monitoring and backups.58 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.
