• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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