Created
March 31, 2026 09:49
-
-
Save lionants02/ae3860c79f21dc4d8faf18bcb73652a5 to your computer and use it in GitHub Desktop.
nginx security return 404 direct ip address
This file contains hidden or 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
| server { | |
| listen 80 default_server; | |
| listen [::]:80 default_server; | |
| listen 443 ssl default_server; | |
| listen [::]:443 ssl default_server; | |
| access_log /var/log/nginx/default.log; | |
| error_log /var/log/nginx/default.log; | |
| ssl_certificate cer; | |
| ssl_certificate_key key; | |
| server_name _; | |
| root /var/www/html; | |
| location / { | |
| try_files $uri $uri/ =404; | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/ergin/nginx-cloudflare-real-ip