Created
September 3, 2016 21:38
-
-
Save tonyarkles/853c906b8eff40f8dd1b9bcbcf30f0ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location / { | |
# First attempt to serve request as file, then | |
# as directory, then fall back to displaying a 404. | |
try_files $uri $uri/ =404; | |
error_page 404 = @boom; # Uncomment to enable naxsi on this location | |
# include /etc/nginx/naxsi.rules | |
} | |
location /blammo { | |
add_header Content-Type text/plain; | |
return 200 "Hi there"; | |
} | |
location @boom { | |
#set_escape_uri $orig_uri $scheme://$http_host$request_uri$is_arg$args; | |
set $orig_uri $scheme://$http_host$request_uri; #$is_args$args; | |
return 302 $scheme://$http_host/blammo?return_to=$orig_uri; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment