NGiNX Location

MD
R
Markdown

Explanation of NGiNX Location Directive. Based on the location directive match it will use some configuration. This is based on a prefix or pattern of the incoming URL.

Syntax:

location [modifier] match { ... configuration }

Reload NGiNX Config

service nginx reload

Custom 404 Page Location

error_page 404 /404.html; location = /404.html { root /var/www/html/errors; }

Custom 500 Location

error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/html/errors; }

Custom Location

location /cr/ { root /custom/crt }

Created on 9/2/2018