Category: Nginx

Apache vs Nginx: A Tale of Two Web Servers

Apache and Nginx power a huge share of the modern web, but they were born in very different eras to solve very different problems. This article traces their histories from NCSA HTTPd and the C10k problem through to today’s hosting stacks, then compares their architectures, strengths, weaknesses, and ideal use cases.

Read More »

How to Add a Custom HTTP Header to All Sites on a Plesk Server

Adding custom headers is a useful way to identify, trace, or control web traffic across a hosted environment. This guide walks through the process of adding the HTTP header X-Hosted-By: ExampleHost to all websites running on a Plesk server, across both nginx and Apache layers. Why Add a Custom Header? Custom HTTP headers can: Identify the infrastructure powering your site (e.g., for branding or tracing) Assist in diagnostics or security logging Be used for custom caching or CDN logic Step-by-Step: Add Header in nginx Step 1: Copy the nginx Template First, copy the default Plesk template into a custom directory:

Step 2: Edit the Template Open the copied file:

Locate the block that outputs header directives, such as:

Insert your custom header right after:

Step 3: Rebuild nginx Configurations

Step 4: Restart nginx

Step-by-Step: Add Header in Apache Step 1: Copy the Apache Template

Read More »

Plesk / Nginx Open Files Limit

Was trying to increase open files limit for nginx on a Plesk server following instructions here: MariaDB on CentOS 7 – “Error in accept: Too many open files” But the limit was not changing. After digging around I found that Plesk was overriding with a config file here: /usr/lib/systemd/system/nginx.service.d/limit_nofile.conf As described here: https://support.plesk.com/hc/en-us/articles/213938485-nginx-fails-to-start-reload-on-a-Plesk-server-Too-many-open-files the easy way to fix open file limit on Plesk is to use: /usr/local/psa/admin/sbin/websrv_ulimits –set 100000 –no-restart

Read More »

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.