• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Nginx block robots

/etc/nginx/plesk.conf.d files are dinamic files...
Yes, but in server section, you can see line like:

include "/var/www/vhosts/system/test.tld/conf/vhost_nginx.conf";

And when you add code from the article in "Additional nginx directives" for your site, it will be added to this included /var/www/vhosts/system/test.tld/conf/vhost_nginx.conf file and loaded in corresponding server section of your site.
 
Yes, but in server section, you can see line like:

include "/var/www/vhosts/system/test.tld/conf/vhost_nginx.conf";

And when you add code from the article in "Additional nginx directives" for your site, it will be added to this included /var/www/vhosts/system/test.tld/conf/vhost_nginx.conf file and loaded in corresponding server section of your site.

Ok but there is no way to do it globally?
for now I do it with apache with an file in /etc/httpd/conf.d with

<Directory "/var/www/vhosts/*/httpdocs">
SetEnvIfNoCase User-Agent "spbot" bad_bot
.....
Deny from env=bad_bot
</Directory>

Do it by apache is worst that by nginx, but need an global solution, not an individual way...
 
But you can add it to "nginx directives" of your service plan and sync all subscriptions with it.
 
But you can add it to "nginx directives" of your service plan and sync all subscriptions with it.

Ok but in our case, we don't use plan as each user have these own limits. If there is no other way, I will try to do it with an script...

Thanks
 
Use something like

# for filename in `find /var/www/vhosts/system/*/conf/ -name vhost_nginx.conf`; do echo $filename; echo "......................" > $filename; echo ''; done
 
Back
Top