Fast, Scalable And Secure Web Hosting For Web Developers
Fast, Scalable And Secure Web Hosting For Web Developers
Minimum price
Suggested price
Fast, Scalable And Secure Web Hosting For Web Developers

This book is 100% complete

Completed on 2019-02-02

About the Book

Good website performance is becoming a top priority for many webmasters. This is because it gives the users of your site a better experience.

It also helps your ranking in search engines, which may offer you more free traffic from them. If you have an e-commerce site, several studies have shown that a faster website can increase the sale conversions, thus revenue!

Understanding the building blocks of your website will make sure that it can scale in popularity while keeping it stable and fast!

The first section of the book gives an overview on what to look for in a web hosting company. Where should you host your site and with whom? We will give you an overview of the alternatives and show you how you can choose the best solution for your specific use case.

After having chosen a webhosting package and server, we will install a Linux-based OS on our server. We’ll guide you through choosing and installing the right Linux distribution.

After the base OS installation has been completed, we'll install and configure commonly used web software including

  • Nginx webserver
  • PHP 5x and 7.x
  • Memcached
  • Java
  • Jetty 9.x
  • MariaDB database (drop-in replacement for MySQL)
  • CSF Firewall
  • Wordpress
  • Google's PageSpeed plugin for nginx

We will also focus on tuning the OS for performance and scalability. Making your server and website secure (via HTTPS) is a hot topic since Google announced it can positively impact your Search Engine Rankings. We'll describe how to enable HTTPS and secure connections to your website.

We'll also explain technologies like SPDY, HTTP/2 and CDN and how they can help you to make your site faster for your visitors from all around the world.

Still not convinced?

Let me share a few quotes from readers:

*Take advantage of our winter sale* ! We now offer the Fast, Scalable And Secure web hosting ebook for a suggested price of $29.99, that's 25% off! Buy now :)

About the Author

Wim Bervoets
Wim Bervoets

Wim Bervoets is a veteran in the world of websites.

I started my first website Wim's BIOS ( back in 1996 as a hobby. Wim’s BIOS is the internet premier source for finding BIOS Updates. Besides in formation on how to find the correct BIOS upgrade, you can find out general information about yout PC’s BIOS, the manufacturer of your motherboard, BIOS settings, FAQ.

More then 15 years later this technology site keeps going strong with thousands of visitors every day.

Aside from that I'm a professional Java, Android and iOS developer / architect with 15 year experience in building enterprise based systems.

I currently live in the heart of Europe - Belgium - well known for its good beers, fries and chocolates :-)

Table of Contents

  • Preface
    • Who Is This Book For?
    • Why Do You Need This Book?
  • Introduction
  • Choosing Your Website Hosting
    • Types Of Hosting
      • Shared Hosting
      • VPS Hosting
      • Dedicated Hosting
      • Cloud Hosting
    • Unmanaged vs Managed Hosting
    • Our Recommendation
    • Checklist For Choosing Your Optimal Webhost Provider
      • Performance Based Considerations
      • Benchmarking web hosts
      • VPS Virtualization methods considerations
      • IPv4 / IPv6 Support
    • Example ordering process
      • RamNode Ordering
  • Installing the Operating System
    • Choosing a Linux Distribution
      • The Linux kernel used should be as recent as possible
      • Choosing a Server Distribution
    • Installing Ubuntu 18.04.1
      • Selecting the ISO template in the Ramnode Control Panel and Booting from CDROM
      • Using Tight VNC Viewer
      • Start the Ubuntu Server Install
      • Setting up SSH access to login to your server
      • Login via SSH
      • Updating system packages
      • Securing /tmp and /var/tmp
      • Installing Miscellaneous Tools
      • Enabling IPv6 Support
      • Useful Linux Commands
    • Upgrading Ubuntu 18.04.1 to 18.10
      • Remount the temp partition with noexec false
      • Remove any unused old kernels
      • Do the upgrade via VNC
  • Performance Baseline
    • Testing Ping Speed
  • Tuning KVM Virtualization Settings
    • VPS Control Panel Settings
    • Configuring the CPU Model Exposed to KVM Instances
  • Tuning Kernel Parameters
    • Improving Network speeds (TCP/IP settings)
      • Disabling TCP/IP Slow start after idle
      • Other Network and TCP/IP Settings
    • File Handle Settings
      • Setup the number of file handles and open files
    • Improving SSD Speeds
      • Kernel settings
      • Scheduler Settings
      • Reducing writes on your SSD drive
      • Enable SSD TRIM
      • Other kernel settings
  • Installing OpenSSL
    • Installing OpenSSL 1.1.0j
    • Upgrading OpenSSL to a Future Release
    • Check Intel AES Instructions Are Used By OpenSSL
  • Securing your Server
    • Installing CSF (ConfigServer Security and Firewall)
      • Configuring the ports to open
      • Configuring and Enabling CSF
    • Login Failure Daemon (Lfd)
  • Ordering a Domain Name For Your Website
    • Choosing a Domain Name and a Top Level Domain
    • Ordering a Domain With EuroDNS
    • Configuring a Name Server
    • Ordering the DNSMadeEasy DNS Service
  • Installing MariaDB 10, a MySQL Database Alternative
    • Download & Install MariaDB
    • Securing MariaDB
    • Starting and Stopping MariaDB
    • Upgrade MariaDB To a New Version
    • Tuning the MariaDB configuration
      • Kernel Parameters
      • Storage Engines
      • Using MySQLTuner
      • Enabling HugePages
      • System Variables
      • Enabling Logrotation for MariaDB
      • Diagnosing MySQL/MariaDB Startup Failures
  • Installing nginx Webserver
    • Why nginx ?
    • Installing nginx
    • Download nginx
      • Download the nginx Pagespeed module
      • Install Perl Compatible Regular expressions
      • Install NGX Cache Purge
      • Install set-misc-nginx module
      • Install ngx-brotli
    • Compile nginx
      • nginx Compilation Flags
      • PID files; what are they?
    • nginx Releases
    • nginx Configuration
      • Creating a nginx System User
      • Configure the nginx system user open files maximum
      • nginx Startup and Shutdown Scripts
      • nginx configuration files
      • Test the Correctness of the nginx Configuration Files
      • Updating the system user which launches nginx
      • Updating the PID File Location
      • Updating worker_processes
      • Updating worker_priority
      • Updating the Error Log File Location
      • Enable PCRE JIT
      • Configuring the Events Directive
      • Configuring the HTTP Directive
      • Configuring the Mime Types
      • Configuring Your Website Domain in nginx
      • Updating nginx
  • Installing PHP
    • Which PHP Version?
    • What is an OpCode Cache?
    • Zend OpCache
    • Compile PHP From Source?
    • Install Dependencies for PHP Compilation
    • Downloading PHP
    • Compile and Install PHP
      • Compilation flags
    • Testing the PHP Install
    • Tuning php.ini settings
      • Set the System Timezone
      • Set maximum execution time
      • Set duration of realpath information cache
      • Set maximum size of an uploaded file.
      • Set maximum amount of memory a script is allowed to allocate
      • Set maximum size of HTTP POST data allowed
      • Don’t expose to the world that PHP is installed
      • Disable functions for security reasons
      • Disable X-PHP-Originating-Script header in mails sent by PHP
      • Sets the max nesting depth of HTTP input variables
      • Sets the max nesting depth of input variables in HTTP GET, POST (eg. $_GET, $_POST.. in PHP)
      • Enable Zend Opcache
  • Installing PHP-FPM
    • Configuring PHP-FPM
    • Configuring a PHP-FPM Pool
    • How to start PHP-FPM
    • nginx FPM Configuration
    • Viewing the PHP FPM Status Page
    • Viewing statistics from the Zend OpCode cache
    • Starting PHP-FPM Automatically At Bootup
    • Log File Management For PHP-FPM
  • Installing memcached
    • Comparison of caches
    • Downloading memcached And Extensions
      • Installing Libevent
      • memcached Server
      • Installing libmemcached
      • Installing igbinary
      • Install pecl/memcache extension for PHP
      • Install pecl/memcached extension for PHP
    • Testing The memcached Server Installation
    • Setup the memcached Service
    • Installing a Memcached GUI
    • Testing the scalability of Memcached server with twemperf and mcperf
  • Updating PHP To a New Version
    • Download the New PHP Version
  • Installing ImageMagick for PHP
    • Install ImageMagick
  • Installing PHP7
    • Download PHP7
      • Install memcache PHP extension
      • Install memcached PHP extension
      • Install igbinary PHP extension
    • Configuring PHP7 php.ini file and php-fpm.conf file
    • Configuring PHP-FPM Start Stop script
    • Configuring PHP7 in nginx webserver
    • Configure PHP-FPM for PHP7 to start automatically.
    • Configure PHP7 log file rotation
  • Installing PHPMyAdmin
    • Installing phpMyAdmin
  • Installing Java
    • Check the installed version Java
    • Downloading Java SE JDK 8 update 202
    • Installing Java SE JDK8 Update 202
    • Making Java SE JDK8 the default
  • Installing Jetty
    • Download Jetty 9.4.x
    • Creating a Jetty user
    • Jetty startup script
    • Configuring a Jetty Base directory
    • Overriding the directory Jetty monitors for your Java webapp
    • Adding the Jetty port to the CSF Firewall
    • Autostart Jetty at bootup
    • Enabling Large Page/HugePage support for Java / Jetty
      • Adding the jetty user to our hugepage group
      • Update memlock in /etc/security/limits.conf
      • Add UseLargePages parameter to the Jetty startup script
    • Forwarding requests from Nginx to our Jetty server
    • Improving Jetty Server performance
      • Installing Visual VM on your PC
      • Enabling Remote monitoring of the Jetty Server Java VM
      • Garbage Collection in Java
      • Optimising Java connections to the MariaDB database
      • Download and install the MariaDB JDBC4 driver
      • Download and install the Oracle MySQL JDBC driver
      • Download and install HikariCP - a database connection pool
      • Configuring Jetty logging and enabling logfile rotation
  • Using a CDN
    • Choosing a CDN
    • Analysing performance before and after enabling a CDN
    • Configuring a CDN service
      • Create a New Zone.
      • Using a cdn subdomain like
      • Tuning the performance of your CDN
  • HTTPS everywhere
    • Do you need a secure website?
    • Buying a certificate for your site
      • Standard certificate
      • Wildcard certificate.
      • Public and private key length
      • Extended Validation certificates and the green bar in the browsers
    • Buying the certificate
      • Generate a Certificate Signing request
      • Ordering a certificate
      • Configuring nginx for SSL
      • Getting an A+ grade on
      • Enabling SSL on a CDN
      • Enabling SPDY or HTTP/2 on a CDN
  • HTTPS certificates via Let’s Encrypt
    • Install Certbot / Let’s Encrypt
    • Generating a certificate for
    • Configure nginx to use Let’s Encrypt certificate
    • Automating renewal of Let’s Encrypt certificates
    • Using DNS challenge to generate and validate your certificate
  • Configure Email For Your Domain
    • Selfhosted Email Servers vs External Mail Systems
    • Signup for Zoho email
      • Verify Domain
      • Add Users
      • Add Groups
      • Configure Email Delivery
      • Securing your email address
  • Installing Wordpress
    • Downloading Wordpress
    • Enabling PHP In Your Nginx Server Configuration
    • Creating a Database For Your Wordpress Installation
    • Installing Wordpress
    • Enabling auto-updates for Wordpress (core, plugins and themes)
    • Installing Wordpress plugins
      • Installing Yoast SEO
  • Optimizing Wordpress performance
    • Upload small sized images in the Wordpress media library
      • Resizing images with Imagemagick
    • EWWW Image Optimizer Wordpress plugin
    • Remove CSS Link IDs plugin
    • Disable Emojis support in Wordpress 4.2 and later
    • Install the Cache Enabler plugin
    • Install the CDN Enabler plugin
    • Optimizing Wordpress performance with the W3 Total Cache plugin (deprecated)
    • Installing W3 Total Cache
  • Speed up your site with Google PageSpeed nginx plugin
    • Configuring global Pagespeed settings.
    • Enabling Pagespeed filters
    • Optimizing the performance of the Pagespeed plugin
      • Cache lookups that were expired
      • Resources not rewritten because domain wasn’t authorized
      • CDN Integration & HTTPS support
      • Extending the Memcached cache size
      • Disabling Pagespeed plugin for Wordpress Administration pages
  • Appendix: Resources
    • TCP IP
    • Ubuntu / Linux
    • KVM
    • SSD
    • OpenSSL
    • Nginx
    • PHP
    • MariaDB
    • Jetty
    • CDN
    • HTTPS

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. Free App. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets), MOBI (for Kindle) and in the free Leanpub App (for Mac, Windows, iOS and Android). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

Authors, publishers and universities use Leanpub to publish amazing in-progress and completed books and courses, just like this one. You can use Leanpub to write, publish and sell your book or course as well! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub