• 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
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff 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