Install Nginx from source

Nginx Web Server

Install Requirements CentOS/RHEL/Fedora

Ubuntu/Debian

Create nginx user

Downoad and insta Nginx You can download latest version of Nginx source code from https://nginx.org/en/download.html 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. https://nginxproxymanager.com Nginx Proxy Manager Certificate Key is not valid Install Custom SSL on Nginx Proxy Manager To install, create a folder

Creaye docker-compose.yaml file

add following content

If you need to use other ports, for […]

Read More…

Enable CORS in Nginx

To enable CORS in nginx, add following inside web sites sevrer config.

Restart nginx

See CORS […]

Read More…

Nginx show full url in access log

To show the full URL in nginx access log, add the following

If you are behind reverse proxy, replace $remote_addr with $http_x_forwarded_for See Nginx […]

Read More…

Nginx HTTP 414 request-URI too large

Nginx Web Server

On a Nginx server, when accessing a long url, i get error

To fix the error, edit

inside “http” section, find

Replace the line with

If your URL is very large, you may need to increase the 32k to higher or reduce the url length. Large url like this mostly happend […]

Read More…

Show Real IP Nginx Behind Reverse Proxy

Nginx Web Server

When your Nginx web server is running behind a reverse proxy, you will see IP of the reverse proxy server as visitor IP in web servers access log. To fix this, edit nginx.conf file

Find

Inside http section, add

Example

Restart Nginx

[…]

Read More…