• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Forwarded to devs Changing "Cache key" value to incorrect breaks ngnix.conf without option to repair

Mike99

Basic Pleskian
TITLE:
Changing "Cache key" value to incorrect breaks ngnix.conf without option to repair
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
Plesk Onyx v17.8.11_build1708180301.19 os_Ubuntu 16.04
PROBLEM DESCRIPTION:
In Home > Domain > Apache & nginx Settings > Enable nginx caching > Cache key,

I accidentally input incorrect value resulting in $scheme$request_method$host$request_uri$$sent_http_geoip_country

The double $$ was the problem, I tried to fix it, but settings form would not let me change the value back to one $, it generated an error :

... invalid configuration on line ...

Unable to use the current nginx configuration file and to rollback to the previous version of the file because they both contain invalid configuration.

I tried to correct the value from GUI, it gave me the same error over and over again and did not save my changes.

/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain example.com
[2018-06-24 16:04:08.007] ERR [util_exec] proc_close() failed ['/opt/psa/admin/bin/nginx-config' '-t'] with exit code [1]
[2018-06-24 16:04:08.076] ERR [panel] Apache config (15298490470.93490300) generation failed: Template_Exception: nginx: [emerg] invalid variable name in /etc/nginx/plesk.conf.d/vhosts/example.com.conf:49
nginx: configuration file /etc/nginx/nginx.conf test failed

file: /opt/psa/admin/plib/Template/Writer/Webserver/Abstract.php
line: 75
code: 0
nginx: [emerg] invalid variable name in /etc/nginx/plesk.conf.d/vhosts/example.com.conf:49
nginx: configuration file /etc/nginx/nginx.conf test failed​
STEPS TO REPRODUCE:
In Home > Domain > Apache & nginx Settings > Enable nginx caching > Cache key, insert variable with double $$​
ACTUAL RESULT:
The result is that Apache & nginx Settings cannot be used for this domain anymore, I had to reinstall whole domain.​
EXPECTED RESULT:
Expect to be able to fix the $$ to $ in Cache key input form and config would be regenerated upon Apply or Ok​
ANY ADDITIONAL INFORMATION:
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:
Confirm bug
 
Thank you for report.
Bug PPPM-8854 was confirmed and submitted.
 
Back
Top