== Linux/Nginx notes == == Nginx == listen 443 ssl http2; == Nginx proxy == http://www.tweaked.io/guide/nginx-proxying/ == Nginx map == * Map is used as fast efficient lookup in nginx * Format is {{{ map $var_to_compare $var_to_set { ~String1Regex SetValue1; ~String2Regex SetValue2; default SetDefaultValue; } }}} * e.g. seo redirect {{{ map $request_uri $map_seo_redirect { default 0; ~/path1/subpath?q=abc$ https://vigor.nz/newurl1; ~/path2 https://vigor.nz/newurl2 } ... ... if ($map_seo_redirect) { add_header X-debug-message "map_seo_redirect - testme - $request_uri" always; rewrite ^ $map_seo_redirect permanent; # return 301 $map_seo_redirect; } }}} ---- CategoryLinux