• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    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. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved Unable to block folders in Plesk with nginx

Azurel

Silver Pleskian
Plesk Onyx Version 17.0.17 Update #28

Its a CDN domain for images and I want block images for a spezific folder, so I add:

location ~* /myfolder1/(a|b|c)/ {
deny all
return 403
}

Thats never will happen, but why? Is here a problem with nginx.conf for this domain, because:
server {
location / {
}

location @fallback {
}

location ~ ^/(.*\.(ac3|avi|bmp|bz2|css|cue|dat|doc|docx|dts|eot|exe|flv|gif|gz|htm|html|ico|img|iso|jpeg|jpg|js|mkv|mp3|mp4|mpeg|mpg|ogg|pdf|png|ppt|pptx|qt|rar|rm|svg|swf|tar|tgz|ttf|txt|wav|woff|woff2|xls|xlsx|zip))$ {
try_files $uri @fallback;
}

include "/var/www/vhosts/system/cdn.example.com/conf/vhost_nginx.conf";
}

What can I do?
 
Last edited:
Is this a bug? Can I report it? Is here a Workaround? I think the include must set before @fallback in nginx.conf.

Here is a small issue in default plesk nginx.conf it should be
location ~* ^/........... (~* means case-insensitive regular expression match)
Actual its only catch file types with lowercase, not "Jpg" or "JPG" or "TXT", .....

and why
^/(.*\.(ac3|avi|.......
ant not only?
\.(ac3|avi|.......


EDIT: This topic was moved from "Plesk Onxy for Linux". Because I think this is a important issue in plesk onyx, I create there a new topic. This topic can be deleted.
https://talk.plesk.com/threads/its-...-types-in-additional-nginx-directives.343909/
 
Last edited:
Back
Top