• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Nginx Static Content

Janko1000

Regular Pleskian
Hi,

Does the Nginx WebServer serve the Static Content eg. .gif .jpg?
I have installed mod_status and find a lot "static" request in the Apache.

As a temporary solution i set in the last_nginx.conf for each Domain:

location ~* ^.+.(jpe?g|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|avi|mp3)$ {
expires max;
root /var/www/vhosts/domain.com/httpdocs;
}

But how can i set this to the Custom Template? I can not find any Variable for root /var..........


Thanks a lot
 
You can define a desired customization for Nginx in Plesk default templates for Nginx server:

/usr/local/psa/admin/conf/templates/default/nginx.php
/usr/local/psa/admin/conf/templates/default/nginxDomainForwarding.php
/usr/local/psa/admin/conf/templates/default/nginxDomainVhost.php

However, please do not modify these files above. You should copy them into the folder below and there you can adjust the custom settings.

/usr/local/psa/admin/conf/templates/custom/
 
Back
Top