I found that an unknown domain like www.aaa.com
serving exactly the same contents (html, js ,css, any asset) of my site: myname.me
.
And the API as well, for example, www.aaa.com/api/user
get the same response as myname.me/api/user
.
How can I block this domain from serving my thing?
How does it make this, redirect directly to my domain? Proxy? DNS?
I use VPS and I use nginx, here my nginx config, This is the redirection to https:
server {
if ($host = example.me) {
return 301 https://$host$request_uri;
}
listen 80 default_server;
listen [::]:80 default_server;
server_name example.me;
return 404;
}
This is the proxy from https request to my application running on port 3000:
server {
root /var/www/html/example
server_tokens off;
index index.html index.htm index.nginx-debian.html;
server_name example.me;
# add_header Cache-Control no-cache;
location / {
# First attempt to serve request as file, then as directory, then fall back to displaying a 404.
# try_files $uri $uri/ =404;
proxy_pass http://198.51.100.1:3000$request_uri;
}
}