Files
SimpleRickroll/nginx.conf
T

26 lines
563 B
Nginx Configuration File

server {
listen 1000;
server_name _;
server_tokens off;
root /usr/share/nginx/html;
add_header X-Content-Type-Options nosniff always;
add_header X-Frame-Options DENY always;
add_header Referrer-Policy no-referrer always;
# Only static reads; scanners POSTing exploits get 405
if ($request_method !~ ^(GET|HEAD)$) {
return 405;
}
location = /rickroll.mp4 {
expires 7d;
}
# Every other path (/wp-admin, /.env, ...) gets rickrolled
location / {
try_files /index.html =404;
}
}