Introduction By default, Nginx may expose web server and operating system information through HTTP response headers. For example, a server may return a header such as Server: nginx/1.10.0 (Ubuntu). Exposing this information can help attackers identify the web server version and operating system, which may make it easier to target… Continue Reading Hide Web Server Information and Modify Server Header on Nginx.

Introduction Normally, we may need multiple domain names or subdomains to point to the same website and document root. In Apache, we can use ServerAlias for this purpose. In Nginx, we can achieve the same functionality by adding multiple domain names to the server_name directive. In this article, we will… Continue Reading How to Configure Server Alias on Nginx Web Server

Introduction Redirecting non-www requests to www is a common web server configuration used to maintain a consistent website URL. Nginx can handle this redirection using a simple server block configuration. This helps ensure that visitors accessing the website without www are automatically redirected to the www version. A permanent 301… Continue Reading How to Configure Nginx to Redirect Non-WWW to WWW

Introduction One of the most common challenges when deploying applications behind a load balancer is enforcing HTTPS redirection. In many environments, SSL/TLS termination happens at the load balancer level, and requests are forwarded to backend Nginx servers over HTTP. In this scenario, traditional HTTP-to-HTTPS redirection methods may fail or create… Continue Reading Redirect http to https on nginx behind load balancers

Introduction Setting up a reliable and high-performance web server is one of the first steps in hosting dynamic web applications. The LEMP stack—Linux, Nginx, MariaDB, and PHP-FPM—is a popular choice due to its speed, stability, and efficient resource utilization. Although CentOS 7 has reached its end of life, many organizations… Continue Reading Install Nginx, PHP-fpm, Mariadb on Centos 7