• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

Issue Serve static assets with an efficient cache policy on nginx server

Marian97c

New Pleskian
Hello, I have a problem with
Serve static assets with an efficient cache policy, which shows me in page speed test by Google, can you help me fix the problem?

Issue
vQQbfYS.png

Settings
D4nyLxU.png

Additional nginx directives

Code:
# Enable Gzip compression
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types
application/atom+xml
application/javascript
application/json
application/rss+xml
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/svg+xml
image/x-icon
text/css
text/plain
text/x-component
text/xml
text/javascript;

# Cache static files
location ~* \.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|swf|webp)$ {
    add_header "Access-Control-Allow-Origin" "*";
    access_log off;
    log_not_found off;
    expires 30d;
}

Serve static files directly by nginx - ACTIVATED
Code:
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

Htaccess in attach files


I also use wp rocket and I installed the wp rocket module on the server, I think I have to add something in the directives but I'm not sure.

I am a beginner and I want help, probably htaccess is inappropriate, please offer me a better option, if possible.

Don't throw stones and post only if you can help me. Thanks!
 

Attachments

  • htaccess].zip
    3.2 KB · Views: 16
This is the top search on google when you search for this issue and its bugging me that it was never answered!

Here are my setting below that work for me using a WordPress site.

On Proxy Mode

On Smart static files processing

On Serve static files directly by nginx
Remove all but below
ac3 avi cue dat docx dts eot exe htm html img iso mkv mp3 mp4 mpeg mpg ogg pptx qt rm xls xlsx zip webp

Off Enable nginx caching (though I don't think it matters)

Additional nginx directives
location ~* \.(js|jpg|jpeg|gif|png|css|tgz|gz|rar|bz2|doc|pdf|ppt|tar|wav|bmp|rtf|swf|ico|flv|txt|woff|woff2|svg|webm|ttf|otf|min)$ {
etag on;
if_modified_since exact;
add_header Pragma "public";
add_header Cache-Control "max-age=31536000, public";
}
 

Attachments

  • Screenshot 2021-10-13 at 11.25.04.png
    Screenshot 2021-10-13 at 11.25.04.png
    591.7 KB · Views: 78
Hi people. Did anybody get any further with this one? I am being hit with "Serve static assets with an efficient cache policy" throughout all my Wordpress sites too.

Anybody aware of additional Nginx directives to appease Google insights reports?

I usually run with the attached by default.

Plesk is on latest 18.0.52
CentOS 7.9
 

Attachments

  • Screenshot 2023-06-15 at 16.27.59.png
    Screenshot 2023-06-15 at 16.27.59.png
    276.8 KB · Views: 17
Back
Top