Fading Coder

One Final Commit for the Last Sprint

Essential Server Configuration Steps for Microservice Deployments

1. Persisting Firewall Port Rules When exposing services to external traffic, port configurations must survive system reboots. Using firewalld, rules are applied to the runtime environment by default. To make them permanent, append the --permanent flag: sudo firewall-cmd --zone=public --add-port=808...

Setting Up Mutual TLS Authentication with Nginx

One-Way TLS Authentication In one-way TLS, only the client verifies the server's identity. The server presents its certificate, the client validates it, and a secure session is established without the server checking the client's certificate. This is typical for public websites. The handshake procee...

Configuring Nginx for Load Balancing

Setting Up the Nginx Environment This setup uses CentOS 7 with properly configured yum repositories. For those needing repository configuration, the Alibaba Cloud mirror site provides necessary resources. Begin by creating and navigating to the Nginx directory: mkdir -p /soft/nginx cd /soft/nginx Do...

Quick Setup Guide for Nginx on CentOS 7

Installing and Starting Nginx Install the Nginx package using yum: sudo yum install nginx -y Start the Nginx service: sudo systemctl start nginx Enable Nginx to start on system boot: sudo systemctl enable nginx Verifying Service Status Check the current status of the Nginx service: sudo systemctl st...

Understanding Nginx Default Configuration and Log Formatting

Default Nginx Configuration To examine the default configuration files for Nginx, inspect /etc/nginx/nginx.conf. The end of this file typically includes directives that load all .conf file from /etc/nginx/conf.d/. Check the contents of /etc/nginx/conf.d/: ls /etc/nginx/conf.d/ By default, two config...

Nginx Core Concepts and Practical Configuration Guide

Nginx is a lightweight, high-performance web server and reverse proxy server developed by Igor Sysoev from Russia. It excels in handling high concurrency, with reports indicating support for up to 50,000 simultaneous connections. Nginx Features Nginx is widely adopted in internet projects due to sev...

Nginx Modules Reference: Configuration Options and External Module Installation

Nginx Built-in Modules --prefix=/usr/local/nginx # Installation directory --sbin-path=/usr/local/nginx/sbin/nginx # Binary executable path --conf-path=/usr/local/nginx/conf/nginx.conf # Configuration file path --error-log-path=/var/log/nginx/error.log # Error log location --pid-path=/var/run/nginx.p...

Building a Custom Alpine-Based LNP Stack Docker Image

To create a lightweight Docker image based on Alpine Linux that includes Nginx and PHP-FPM (an LNP stack), start by defining a base PHP layer. For compatibility with legacy applications, use PHP 5.6 on Alpine 3.3: # php5.dockerfile FROM alpine:3.3 ENV TIMEZONE=Asia/Shanghai \ PHP_MEMORY_LIMIT=512M \...

Nginx Rate Limiting and Access Control Configuration Guide

Rate Limiting Nginx provides two distinct types of rate limiting mechanisms: Connection frequency control via limit_conn_module Request frequency control via limit_req_module HTTP Connection vs Request Behavior HTTP operates over TCP, requiring a three-way handshake before data transfer begins. Once...

Essential Nginx Configuration Recipes for Web Servers

Virtual Host Setup Each server block in Nginx represents a virtual host. Valid configurations include same port/different domain or same domain/different port. Nginx’s default main configuration includes all .conf files under conf.d via include /usr/local/nginx/conf.d/*.conf;. Create a new file ther...