Fast, Scalable And Secure Web Hosting For Web Developers
Fast, Scalable And Secure Web Hosting For Web Developers
Learn to set up your server and website
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 :)
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
-
Types Of Hosting
-
Installing the Operating System
-
Choosing a Linux Distribution
- The Linux kernel used should be as recent as possible
- Choosing a Server Distribution
-
Installing Ubuntu 19.04
- 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
- Installing Miscellaneous Tools
- Enabling IPv6 Support
- Useful Linux Commands
-
Upgrading Ubuntu 19.04 to a future release
- Remove any unused old kernels
- Do the upgrade via VNC
-
Choosing a Linux Distribution
-
Performance Baseline
- ServerScope.io
- Testing Ping Speed
-
Tuning KVM Virtualization Settings
- VPS Control Panel Settings
-
Tuning Kernel Parameters
-
Improving Network speeds (TCP/IP settings)
- Disabling TCP/IP Slow start after idle
-
Improving SSD Speeds
- Scheduler Settings
- Reducing writes on your SSD drive
- Other kernel settings
-
Improving Network speeds (TCP/IP settings)
-
Installing OpenSSL
- Installing OpenSSL 1.1.1c
-
Securing your Server
-
Configuring UFW
- Configuring the ports to open
- A list of ports
- Show the current UFW rules
-
Configuring UFW
-
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
- Starting and Stopping MariaDB
- Securing MariaDB
- Upgrade MariaDB To a New Version
-
Tuning the MariaDB configuration
- Kernel Parameters
- Storage Engines
- Using MySQLTuner
- Enabling HugePages
- System Variables
- Diagnosing MySQL/MariaDB Startup Failures
-
Installing nginx Webserver
- Why nginx ?
-
Installing nginx
- nginx compilation flags
- PID files; what are they?
- nginx Releases
- Starting and stopping nginx
-
nginx Configuration
- nginx configuration files
- Test the Correctness of the nginx Configuration Files
- Optimal Nginx configuration settings
- Error Log File Location
- 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?
- Install PHP 7.3
- What is an OpCode Cache?
- Zend OpCache
- FastCGI Process Manager (FPM)
- Other PHP modules
- Testing the PHP Install
-
Tuning php.ini settings
- 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
-
Installing PHPMyAdmin
- Installing phpMyAdmin
-
Installing Jetty
- Download Jetty 9.4.x
- Adding the Jetty port to the UFW Firewall
- Enabling Large Page/HugePage support for Java / Jetty
-
Forwarding requests from Nginx to our Jetty server
- Garbage Collection in Java
- Optimising Java connections to the MariaDB database
- Download and install the MariaDB JDBC4 driver
- Download and install HikariCP - a database connection pool
-
Enabling Log rotation
- fail2ban log rotation
- MariaDB Log rotation
- Log Rotation For nginx
- Log File Management For PHP-FPM
- Log File Management For Jetty9
-
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 cdn.mywebsite.com
- 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 SSLLabs.com
- 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 yourdomain.com
- 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
-
Upload small sized images in the Wordpress media library
-
Appendix: Resources
- TCP IP
- Ubuntu / Linux
- KVM
- SSD
- OpenSSL
- Nginx
- PHP
- MariaDB
- Jetty
- CDN
- HTTPS
Authors have earned$10,095,386writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
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. 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) and MOBI (for 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
Top Books
C++20
Rainer GrimmC++20 is the next big C++ standard after C++11. As C++11 did it, C++20 changes the way we program modern C++. This change is, in particular, due to the big four of C++20: ranges, coroutines, concepts, and modules.
The book is almost daily updated. These incremental updates ease my interaction with the proofreaders.
A Guide to Artificial Intelligence in Healthcare
Dr. Bertalan MeskoCan we stay human in the age of A.I.? To go even further, can we grow in humanity, can we shape a more humane, more equitable and sustainable healthcare? This e-book aims to prepare healthcare and medical professionals for the era of human-machine collaboration. Read our guide to understanding, anticipating and controlling artificial intelligence.
Atomic Kotlin
Bruce Eckel and Svetlana IsakovaFor both beginning and experienced programmers! From the author of the multi-award-winning Thinking in C++ and Thinking in Java together with a member of the Kotlin language team comes a book that breaks the concepts into small, easy-to-digest "atoms," along with exercises supported by hints and solutions directly inside IntelliJ IDEA!
C++ Best Practices
Jason TurnerLevel up your C++, get the tools working for you, eliminate common problems, and move on to more exciting things!
Introducing EventStorming
Alberto BrandoliniThe deepest tutorial and explanation about EventStorming, straight from the inventor.
Ansible for DevOps
Jeff GeerlingAnsible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
Everyday Rails - RSpecによるRailsテスト入門
Junichi Ito (伊藤淳一), AKIMOTO Toshiharu, 魚振江, and Aaron SumnerRSpecを使ってRailsアプリケーションに信頼性の高いテストを書く実践的なアドバイスを提供します。詳細で丁寧な説明は本書のオリジナルコンテンツです。また、説明には実際に動かせるサンプルアプリケーションも使用します。本書は2017年版にアップデートされ、RSpec 3.6やRails 5.1といった新しい環境に対応しています!さあ、自信をもってテストできるようになりましょう!
R Programming for Data Science
Roger D. PengThis book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
The Hundred-Page Machine Learning Book
Andriy BurkovEverything you really need to know in Machine Learning in a hundred pages.
Continuous Delivery Pipelines
Dave FarleyThis practical handbook provides a step-by-step guide for you to get the best continuous delivery pipeline for your software.
Top Bundles
- #1
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #2
All the Books of The Medical Futurist
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy, digital health investments and how technology giants such as Amazon... - #3
PowerShell
3 Books
Buy every PowerShell book from Adam Bertram at a 20% discount! - #4
Cisco CCNA 200-301 Complet
4 Books
Ce lot comprend les quatre volumes du guide préparation à l'examen de certification Cisco CCNA 200-301. - #5
Software Architecture and Beautiful APIs
2 Books
There is no better way to learn how to design good APIs than to look at many existing examples, complementing the Software Architecture theory on API design. - #6
Linux Administration Complet
4 Books
Ce lot comprend les quatre volumes du Guide Linux Administration :Linux Administration, Volume 1, Administration fondamentale : Guide pratique de préparation aux examens de certification LPIC 1, Linux Essentials, RHCSA et LFCS. Administration fondamentale. Introduction à Linux. Le Shell. Traitement du texte. Arborescence de fichiers. Sécurité... - #7
Learn Git, Bash, and Terraform the Hard Way
3 Books
Learn Git, Bash and Terraform using the Hard Way method.These technologies are essential tools in the DevOps armoury. These books walk you through their features and subtleties in a simple, gradual way that reinforces learning rather than baffling you with theory. - #8
9 Books-Bundle: Shut Up and Code!
9 Books
"Shut up and code." Laughter in the audience. The hacker had just plugged in his notebook and started sharing his screen to present his super-smart Python script. "Shut up and code" The letters written in a white literal coding font on black background was the hackers' home screen background mantra. At the time, I was a first-year computer... - #9
Mastering Containers
2 Books
Docker and Kubernetes are taking the world by storm! These books will get you up-to-speed fast! Docker Deep Dive is over 400 pages long, and covers all objectives on the Docker Certified Associate exam.The Kubernetes Book includes everything you need to get up and running with Kubernetes! - #10
CCDE Practical Studies (All labs)
3 Books
CCDE lab