Config nginx to remove DMCA link in p2p drive tool

If you are not lucky, sometimes you will receive the DMCA report email as shown below

We need to delete the link above, so that when the reporter accesses it will look like this

We need to configure nginx to delete the link on it, edit the /etc/nginx/nginx.conf file and find 2 locations as / public and / and then configure it as 2 images below, remember that long string of characters is id in link has report

location /public {
         root /root/p2pdrive;
         if ($arg_id = 147a3fe1fba48031793c8004a86d03db) {
		return 404;
location / {
        if ($http_user_agent ~* (google) ) {
            return 403;
        if ($uri ~ "^(.*)/(147a3fe1fba48031793c8004a86d03db)(.*)") {
	    return 404;
	#deny all;
	proxy_pass http://backend;
	proxy_http_version 1.1;
	proxy_send_timeout   600;
        proxy_read_timeout   600;
	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header Connection 'upgrade';
	proxy_set_header Host $host;
	proxy_cache_bypass $http_upgrade;

Then save the nginx and reload nginx file with the following 2 commands

nginx -t
nginx -s reload

That’s done, access the report link again, if it returns 404 error, you have configured it right!

If need any support, please inbox me via contact!