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 To install, create a folder

Create config.json file

Add

Creaye docker-compose.yaml file

add following content

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

To start Nginx Proxy Manager, […]

Read More…

Enable CORS in Nginx

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

Restart nginx

See CORS […]

Read More…

List installed Modules in Nginx

To list modules compiled with nginx, run

Example

[…]

Read More…

Nginx show full url in access log

To show full url in nginx access log, add following

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…

Nginx Location Directive

Nginx Location Directive is used to route request to correct files. Match Exact match is used to match an exact URL.

When location is used with no modifiers, then beginning of the URL is matched. In this case, any url http://domain/ok/FILE_NAME will be served from /home/ok/FILE_NAME Exact Match (=) Exact match is used to […]

Read More…

Nginx Password Protect a website

nginx password protect

To password protect a web site, you need to install htpasswd utility. On Ubuntu/Debian, you can install it with command

Now create a password file with command

It will ask for password. Edit configuration file for your web site and add following in the server entry for the web site.

Restart Nginx. […]

Read More…