I have been doing some research on nginx for http_host. Somebody steals my content and I am trying to block it.
For example my website is www.mywebsite.com and a website www.thiefsite.com steals my content which I think is a proxy site. Whenever I change something it affects directly. I tried to see its IP etc with phpinfo I found the ip is cloudflare so there was no way to ban the IP but I saw on phpinfo
$_SERVER['HTTP_HOST'] = www.thiefsite.com $_SERVER['SERVER_NAME'] = www.thiefsite.com
My question is, is it possible for me to detect and block (or redirect to a page) http_host that is not my domain on nginx ?
I already have default but doesn't do anything.
`server { listen 443 default; server_name _;
ssl on;
ssl_certificate /etc/nginx/fake.crt;
ssl_certificate_key /etc/nginx/fake.key;
ssl_client_certificate /etc/nginx/fake.crt;
ssl_verify_client on;
root /opt/nginx/defalut;
return 403;
location / { deny all; }
} ` Thanks.