Leanpub Header

Skip to main content

Fast, Scalable And Secure Web Hosting For Web Developers

Learn to set up your server and website

Create Fast, Scalable and Secure web hosting with FastWebHostingSecrets.com

This book is intended for web developers, internet marketers, startup companies and DIY people that want to create a lightning fast and scalable website using the latest technologies like Nginx, PHP7, Java and Wordpress using their own server.

Minimum price

$29.99

$29.99

You pay

$29.99

Author earns

$23.99
$

...Or Buy With Credits!

You can get credits monthly with a Reader Membership
PDF
EPUB
WEB
227
Pages
43,027Words
About

About

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 7.x
  • PHP-FPM
  • Java 11
  • Jetty 9.4
  • MariaDB database (drop-in replacement for MySQL)
  • UFWFirewall
  • Wordpress

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 summer 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 :)

Share this book

Author

About the Author

Wim Bervoets

Wim Bervoets is a veteran in the world of websites.

I started my first website Wim's BIOS (https://www.wimsbios.com) 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 20 years later this technology site keeps going strong with thousands of visitors every day.

Aside from that I'm a professional Java 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 

Contents

Table of Contents

Preface

  1. Who Is This Book For?
  2. Why Do You Need This Book?

Introduction

Choosing Your Website Hosting

  1. Types Of Hosting
  2. Shared Hosting
  3. VPS Hosting
  4. Dedicated Hosting
  5. Cloud Hosting
  6. Unmanaged vs Managed Hosting
  7. Our Recommendation
  8. Checklist For Choosing Your Optimal Webhost Provider
  9. Performance Based Considerations
  10. Benchmarking web hosts
  11. VPS Virtualization methods considerations
  12. IPv4 / IPv6 Support
  13. Example ordering process
  14. RamNode Ordering

Installing the Operating System

  1. Choosing a Linux Distribution
  2. The Linux kernel used should be as recent as possible
  3. Choosing a Server Distribution
  4. Installing Ubuntu 19.04
  5. Selecting the ISO template in the Ramnode Control Panel and Booting from CDROM
  6. Using Tight VNC Viewer
  7. Start the Ubuntu Server Install
  8. Setting up SSH access to login to your server
  9. Login via SSH
  10. Updating system packages
  11. Installing Miscellaneous Tools
  12. Enabling IPv6 Support
  13. Useful Linux Commands
  14. Upgrading Ubuntu 19.04 to a future release
  15. Remove any unused old kernels
  16. Do the upgrade via VNC

Performance Baseline

  1. ServerScope.io
  2. Testing Ping Speed

Tuning KVM Virtualization Settings

  1. VPS Control Panel Settings

Tuning Kernel Parameters

  1. Improving Network speeds (TCP/IP settings)
  2. Disabling TCP/IP Slow start after idle
  3. Improving SSD Speeds
  4. Scheduler Settings
  5. Reducing writes on your SSD drive
  6. Other kernel settings

Installing OpenSSL

  1. Installing OpenSSL 1.1.1c

Securing your Server

  1. Configuring UFW
  2. Configuring the ports to open
  3. A list of ports
  4. Show the current UFW rules

Ordering a Domain Name For Your Website

  1. Choosing a Domain Name and a Top Level Domain
  2. Ordering a Domain With EuroDNS
  3. Configuring a Name Server
  4. Ordering the DNSMadeEasy DNS Service

Installing MariaDB 10, a MySQL Database Alternative

  1. Download & Install MariaDB
  2. Starting and Stopping MariaDB
  3. Securing MariaDB
  4. Upgrade MariaDB To a New Version
  5. Tuning the MariaDB configuration
  6. Kernel Parameters
  7. Storage Engines
  8. Using MySQLTuner
  9. Enabling HugePages
  10. System Variables
  11. Diagnosing MySQL/MariaDB Startup Failures

Installing nginx Webserver

  1. Why nginx ?
  2. Installing nginx
  3. nginx compilation flags
  4. PID files; what are they?
  5. nginx Releases
  6. Starting and stopping nginx
  7. nginx Configuration
  8. nginx configuration files
  9. Test the Correctness of the nginx Configuration Files
  10. Optimal Nginx configuration settings
  11. Error Log File Location
  12. Configuring the Events Directive
  13. Configuring the HTTP Directive
  14. Configuring the Mime Types
  15. Configuring Your Website Domain in nginx
  16. Updating nginx

Installing PHP

  1. Which PHP Version?
  2. Install PHP 7.3
  3. What is an OpCode Cache?
  4. Zend OpCache
  5. FastCGI Process Manager (FPM)
  6. Other PHP modules
  7. Testing the PHP Install
  8. Tuning php.ini settings
  9. Set maximum execution time
  10. Set duration of realpath information cache
  11. Set maximum size of an uploaded file.
  12. Set maximum amount of memory a script is allowed to allocate
  13. Set maximum size of HTTP POST data allowed
  14. Don’t expose to the world that PHP is installed
  15. Disable functions for security reasons
  16. Disable X-PHP-Originating-Script header in mails sent by PHP
  17. Sets the max nesting depth of HTTP input variables
  18. Sets the max nesting depth of input variables in HTTP GET, POST (eg. $_GET, $_POST.. in PHP)
  19. Enable Zend Opcache

Installing PHP-FPM

  1. Configuring PHP-FPM
  2. Configuring a PHP-FPM Pool
  3. How to start PHP-FPM
  4. nginx FPM Configuration
  5. Viewing the PHP FPM Status Page
  6. Viewing statistics from the Zend OpCode cache

Installing PHPMyAdmin

  1. Installing phpMyAdmin

Installing Jetty

  1. Download Jetty 9.4.x
  2. Adding the Jetty port to the UFW Firewall
  3. Enabling Large Page/HugePage support for Java / Jetty
  4. Forwarding requests from Nginx to our Jetty server
  5. Garbage Collection in Java
  6. Optimising Java connections to the MariaDB database
  7. Download and install the MariaDB JDBC4 driver
  8. Download and install HikariCP - a database connection pool

Enabling Log rotation

  1. fail2ban log rotation
  2. MariaDB Log rotation
  3. Log Rotation For nginx
  4. Log File Management For PHP-FPM
  5. Log File Management For Jetty9

Using a CDN

  1. Choosing a CDN
  2. Analysing performance before and after enabling a CDN
  3. Configuring a CDN service
  4. Create a New Zone.
  5. Using a cdn subdomain like cdn.mywebsite.com
  6. Tuning the performance of your CDN

HTTPS everywhere

  1. Do you need a secure website?
  2. Buying a certificate for your site
  3. Standard certificate
  4. Wildcard certificate.
  5. Public and private key length
  6. Extended Validation certificates and the green bar in the browsers
  7. Buying the certificate
  8. Generate a Certificate Signing request
  9. Ordering a certificate
  10. Configuring nginx for SSL
  11. Getting an A+ grade on SSLLabs.com
  12. Enabling SSL on a CDN
  13. Enabling SPDY or HTTP/2 on a CDN

HTTPS certificates via Let’s Encrypt

  1. Install Certbot / Let’s Encrypt
  2. Generating a certificate for yourdomain.com
  3. Configure nginx to use Let’s Encrypt certificate
  4. Automating renewal of Let’s Encrypt certificates
  5. Using DNS challenge to generate and validate your certificate

Configure Email For Your Domain

  1. Selfhosted Email Servers vs External Mail Systems
  2. Signup for Zoho email
  3. Verify Domain
  4. Add Users
  5. Add Groups
  6. Configure Email Delivery
  7. Securing your email address

Installing Wordpress

  1. Downloading Wordpress
  2. Enabling PHP In Your Nginx Server Configuration
  3. Creating a Database For Your Wordpress Installation
  4. Installing Wordpress
  5. Enabling auto-updates for Wordpress (core, plugins and themes)
  6. Installing Wordpress plugins
  7. Installing Yoast SEO

Optimizing Wordpress performance

  1. Upload small sized images in the Wordpress media library
  2. Resizing images with Imagemagick
  3. EWWW Image Optimizer Wordpress plugin
  4. Remove CSS Link IDs plugin
  5. Disable Emojis support in Wordpress 4.2 and later
  6. Install the Cache Enabler plugin
  7. Install the CDN Enabler plugin
  8. Optimizing Wordpress performance with the W3 Total Cache plugin (deprecated)
  9. Installing W3 Total Cache

Appendix: Resources

  1. TCP IP
  2. Ubuntu / Linux
  3. KVM
  4. SSD
  5. OpenSSL
  6. Nginx
  7. PHP
  8. MariaDB
  9. Jetty
  10. CDN
  11. HTTPS

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

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

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. 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) and EPUB (for phones, tablets and Kindle). 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

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

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. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub