Nginx Hotlink Protection

To block hotlink protection or bandwidth stealing, you can add following to server configuration of your web site.

If you need to allow hotlink from a specific domain, you can edit the valid_referers line and add the url. If you only want to limit access to images and videos, you can put above code […]

Read More…

Nginx Proxy Manager Certificate Key is not valid

When adding custom SSL on Nginx Proxy Manager, i get following error. Upload failed: Certificate Key is not valid (Command failed: openssl ec -in /tmp/15dbf072-4022-aee94-0f88e4fb8d86/tmp -check -noout 2>&1 ) I tried upgrading Nginx Proxy Manager to latest version with following commands

Even after the upgrade this error persist. I checked logs for the docker […]

Read More…

Nginx on Windows

You can download nginx for windows from To download nginx from command line, use following command in PowerShell

Auto Start Nginx on Windows When using Nginx on Windows, you need to escape paths with \ like following

For SSL, i used

See Nginx […]

Read More…

Enable Nginx Status Page

Nginx status is provided by http_stub_status module. To verify if your Nginx is installed with this module, run

If the result shows “with-http_stub_status_module”, you have the module installed. To enbale stats edit nginx configuration file for your web site, add following code

To linmit access to this page, you can use allow


Read More…

Nginx upstream sent too big header

Plesk Nginx

When i login to a PrestaShop web site, i get error on a Plesk server.

On checking error login for the site in folder /var/www/vhosts/, i found following error message proxy_error_log:2020/11/25 19:41:41 [error] 1809#0: *39664 upstream sent too big header while reading response header from upstream, client:, server:, request: “POST /en/login?back=my-account HTTP/2.0”, […]

Read More…

Country Blocking with nginx GeoIP on Ubuntu/Debian

On Ubuntu/Debian, install nginx geoip module with

Now edit nginx.conf


Add below

You can add 2 letter country code and set ye/no as required. To implement GeoIP blocking for a web site, you need to edit server entry for the web site. In this cause, i will use the default […]

Read More…

Install Nginx from source

Nginx Web Server

Install Requirements CentOS/RHEL/Fedora


Create nginx user

Downoad and insta Nginx You can download latest version of Nginx source code from To install version 1.19.2, run

Test Nginx To start nginx run

Configuration file is at

See Nginx […]

Read More…

Install Nginx Proxy Manager

Nginx Proxy Manager

Nginx Proxy Manager is Docker based GUI for managing Nginx reverse proxy. It support LetsEncrypt free SSL. Nginx Proxy Manager Certificate Key is not valid To install, create a folder

Creaye docker-compose.yaml file

add following content

If you don’t have docker and docker-compose installed, install it with

To start Nginx […]

Read More…