• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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