• 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 Unknown "no_cache" variable nginx

Shibumi

Basic Pleskian
TITLE:
Unknown "no_cache" variable nginx

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
OS ‪CentOS Linux 7.4.1708 (Core)‬
Product Plesk Onyx
Version 17.8.11

PROBLEM DESCRIPTION:
The following error shows up in Plesk after upgrade from Plesk 17.5 #43 to 17.8.11 #2:
New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] unknown "no_cache" variable nginx: configuration file /etc/nginx/nginx.conf test failed . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.

We have tried to find the parameter "no_cache" in nginx configuration files in /etc/nginx/(and sub directories) & /var/www/vhosts/system/(and sub directories) but couldn't locate that parameter in any file.

Even using plesk repair web doesn't work:

httpdmng failed: [2018-03-20 16:17:12.243] ERR [util_exec]
proc_close() failed ['/usr/local/psa/admin/bin/nginx-config'
'-t'] with exit code [1]
[2018-03-20 16:17:12.882] ERR [panel] Apache config
(15215590310.88873800) generation failed: Template_Exception:
nginx: [emerg] unknown "no_cache" variable
nginx: configuration file /etc/nginx/nginx.conf test failed

file:
/usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
nginx: [emerg] unknown "no_cache" variable
nginx: configuration file /etc/nginx/nginx.conf test failed

Any help would be appreciated.

With best regards.
 
TITLE:
Unknown "no_cache" variable nginx

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
OS ‪CentOS Linux 7.4.1708 (Core)‬
Product Plesk Onyx
Version 17.8.11

PROBLEM DESCRIPTION:
The following error shows up in Plesk after upgrade from Plesk 17.5 #43 to 17.8.11 #2:
New configuration files for the Apache web server were not created due to the errors in configuration templates: nginx: [emerg] unknown "no_cache" variable nginx: configuration file /etc/nginx/nginx.conf test failed . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files.

We have tried to find the parameter "no_cache" in nginx configuration files in /etc/nginx/(and sub directories) & /var/www/vhosts/system/(and sub directories) but couldn't locate that parameter in any file.

Even using plesk repair web doesn't work:

httpdmng failed: [2018-03-20 16:17:12.243] ERR [util_exec]
proc_close() failed ['/usr/local/psa/admin/bin/nginx-config'
'-t'] with exit code [1]
[2018-03-20 16:17:12.882] ERR [panel] Apache config
(15215590310.88873800) generation failed: Template_Exception:
nginx: [emerg] unknown "no_cache" variable
nginx: configuration file /etc/nginx/nginx.conf test failed

file:
/usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
nginx: [emerg] unknown "no_cache" variable
nginx: configuration file /etc/nginx/nginx.conf test failed

Any help would be appreciated.

With best regards.

Hello,
no_cache directive is added in your vhost configuration when you enable micro-caching on a website. Try to disable Nginx micro-cache
configuration files are located in /etc/nginx/plesk.d/vhosts but are automatically regenerated by Plesk.
 
Hello,
no_cache directive is added in your vhost configuration when you enable micro-caching on a website. Try to disable Nginx micro-cache
configuration files are located in /etc/nginx/plesk.d/vhosts but are automatically regenerated by Plesk.

Disabling microcaching acomplish nothing, the error is still showing up no matter what.
 
Hello,

The issue might be caused by outdated custom vhost templates created on 17.5. Plesk 17.8 brings new features, so in case you have custom vhost templates from 17.5 configuration templates for domains will be generated incorrectly.

Pre-upgrade checker verifies such situation, so you should have the corresponding warning from Plesk before the upgrade.

Solution:
If you have anything in /usr/local/psa/admin/conf/templates/custom/ then move these files out and reconfigure Apache + Nginx:

Clean up Plesk db from current errors:
# plesk db "delete from Configurations where status <> 'ok';"

Recreate configuration:
# plesk repair web
 
Thanks Anton. That fixed the issue, but now it seems that nginx has an error in an SSL certificate

nginx -t
nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/cert-DOg86s") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/cert-DOg86s','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed
 
Thanks Anton. That fixed the issue, but now it seems that nginx has an error in an SSL certificate

nginx -t
nginx: [emerg] BIO_new_file("/usr/local/psa/var/certificates/cert-DOg86s") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/psa/var/certificates/cert-DOg86s','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: configuration file /etc/nginx/nginx.conf test failed

Check that this is webmail certificate with something like

# grep -r cert-DOg86s /etc/nginx/plesk.conf.d/*
/etc/nginx/plesk.conf.d/webmails/example.com_webmail.conf: ssl_certificate /usr/local/psa/var/certificates/cert-DOg86s;

If it is so, clean up all webmail configuration files, including redundant:

# rm -f /etc/nginx/plesk.conf.d/webmails/*

And then rebuild web server configuration files:

# plesk repair web
 
Back
Top