nethubonline
Regular Pleskian
- Server operating system version
- AlmaLinux release 9.3
- Plesk version and microupdate number
- 18.0.70
Dear Plesk Team,
I would like to report a limitation in the current implementation of the “Serve static files directly by nginx” feature. At present, the generated nginx directives use the ~ regex modifier, which performs case-sensitive matching.
This causes an issue where static files with uppercase extensions (e.g., .JPG, .PNG, .CSS) are not served directly by nginx, even though they should logically be treated the same as .jpg or .docx.
Enabling case-insensitive matching is very simple and straightforward:
Thank you for considering this improvement.
I would like to report a limitation in the current implementation of the “Serve static files directly by nginx” feature. At present, the generated nginx directives use the ~ regex modifier, which performs case-sensitive matching.
This causes an issue where static files with uppercase extensions (e.g., .JPG, .PNG, .CSS) are not served directly by nginx, even though they should logically be treated the same as .jpg or .docx.
Enabling case-insensitive matching is very simple and straightforward:
- Change the regex modifier from ~ to ~* in the nginx location block.
- For example:
NGINX: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|webp))$ { ... }
Thank you for considering this improvement.