• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

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