• 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.

Change default file types served by nginx reverse proxy

entim

New Pleskian
We have been serving static files by nginx, dynamic files go to apache - as in default reverse proxy Plesk configuration.

Now I want to exclude 'html' files from static content. I have done it for chosen domain by adjusting smart files processing in nginx settings. But I want to set it globally for all vhosts. Is it possible? What config files shoud I change?

Regards!
 
Hello entim,

To do it for all domains, please use the following script:

mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -N -e" select name from domains where webspace_id=0;"| while read i;do echo $i;/usr/local/psa/bin/subscription --update-web-server-settings $i -nginx-serve-static true -nginx-static-extensions "mp4 avi mp4";done

But firstly please test it for one domain, using the command: # /usr/local/psa/bin/subscription --update-web-server-settings domain.tld -nginx-serve-static true -nginx-static-extensions "mp4 avi mp4"
 
But it is the same solution as for single domain, but used in interated way. When new websites are set up, I would need to repeat the procedure, so it is not what I'm looking for.

Rather I need some configuration setup to be done in some general Nginx files. Do you think it is possible?
 
Back
Top