• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

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