Skip to content

Instantly share code, notes, and snippets.

@supermarsx
Created April 27, 2024 22:26
Show Gist options
  • Save supermarsx/849f4a0c48681940e3481e63e1a6a60b to your computer and use it in GitHub Desktop.
Save supermarsx/849f4a0c48681940e3481e63e1a6a60b to your computer and use it in GitHub Desktop.
Nginx return 200 it works page on 403 error
error_page 403 =200 /virtual403.html;
location = /virtual403.html {
add_header Content-Type text/plain;
root /data/nginx/default_www;
return 200 '<h1>It works!</h1>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment