Nginx error pages

nano /etc/nginx/error-pages.conf error_page 403 404 /40x.html; location = /40x.html { root /var/www/html; } error_page 500 502 503 504 /50x.html; »

Nginx default server

nano /etc/nginx/sites-available/default server { listen 80 default_server; listen [::]:80 default_server; listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; »

Nginx referer

The ngx_http_referer_module module is used to block access to a site for requests with invalid values in the “Referer” header field. nano /etc/ »

Nginx location priority

In Nginx website, it includes these docs as the following: Syntax: location [ = | ~ | ~* | ^~ ] uri { ... } location @name { ... } Default: — Context: server, location A location can either be defined by »