• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is 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.

Forwarded to devs Missing escape character in "additional webserver header" entries in nginx.conf file when quotation marks are used

Bitpalast

Plesk addicted!
Plesk Guru
Username:

TITLE


Missing escape character in "additional webserver header" entries in nginx.conf file when quotation marks are used

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Obsidian 18.0.46, latest MU
CentOS 7.9

PROBLEM DESCRIPTION

I tried to enter an additional webserver header for Apache like

Code:
Link: <https://de-example.com>; rel="alternate"; hreflang="de", <https://en-example.com>; rel="alternate"; hreflang="en"

But when I run
Code:
# curl -I https://de-example.com
I get this result:
Code:
HTTP/1.1 200 OK
Server: nginx
Date: Thu, 25 Aug 2022 16:26:43 GMT
.
.
.
Link: <https://de-example.com>; rel="alternate"; hreflang="de", <https://en-example.com>; rel="alternate"; hreflang="en
X-Powered-By: PleskLin
--> The last double quotation mark " is missing from the added line. It should end with hreflang="en".

In the corresponding nginx.conf file of the subscription account, where these headers are placed, there seems to be an escape \ missing. The line there is

Code:
add_header "Link" "<https://de-example.com>; rel=\"alternate\"; hreflang=\"de\", <https://en-example.com>; rel=\"alternate\"; hreflang=\"en";

But it should be:

Code:
add_header "Link" "<https://de-example.com>; rel=\"alternate\"; hreflang=\"de\", <https://en-example.com>; rel=\"alternate\"; hreflang=\"en\";

STEPS TO REPRODUCE

1) In the GUI go to "additional webserver headers" and add
Code:
Link: <https://de-example.com>; rel="alternate"; hreflang="de", <https://en-example.com>; rel="alternate"; hreflang="en"
2) Save the configuration
3) Either look into /var/www/vhosts/<system>/de-example.com/conf/nginx.conf
or run
Code:
curl -I https://de-example.com
to see what's in the web server.

ACTUAL RESULT

Code:
Link: <https://de-example.com>; rel="alternate"; hreflang="de", <https://en-example.com>; rel="alternate"; hreflang="en

EXPECTED RESULT

Code:
Link: <https://de-example.com>; rel="alternate"; hreflang="de", <https://en-example.com>; rel="alternate"; hreflang="en"

ANY ADDITIONAL INFORMATION

The reason is that the last escape \ is missing from the nginx.conf configuration file when the line is saved.

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
Thank you, Peter.
Confirmed and submitted as PPPM-13695
 
Back
Top