• 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!
  • 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.

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