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

Resolved How to add HTTP Security Header on port 80?

adocsys

New Pleskian
Server operating system version
Almalinux 9.2
Plesk version and microupdate number
18.0.59
Hello,

Currently setting up a server to be PCI compliant and after multiple configuration adjustments, I only have one thing left to correct to have certification. I have set the HTTP Security Headers on all ports but I am not finding the port 80 configuration.

If I test the following, here are the results:

curl -sIL http://host.domain.ext:80
# Does not show any of the security headers, for example, x-content-type-options: nosniff

curl -sIL https://host.domain.ext:443
# Shows all my security headers, including x-content-type-options: nosniff

I have searched thru the files in /etc/sw-cp-server/ because it is Nginx that answers the call (I see header Server: nginx and netstat shows nginx process listening on port 80) but I am unable to find where I can add the directive.

The /etc/sw-cp-server/conf.d/plesk.conf file already contains the directives under the server tag and works fine for multiple ports but not port 80 sadly...

Has someone already done this or have a clue where the headers should be added?

Thanks a lot!
 
Oh! I think I finally found. I needed to go play a game of hockey to have my head to stop thinking.

I simply edited the /etc/nginx/nginx.conf file and added the directives in the http section. Now I see the new headers on port 80. Will re-launch PCI certification scan and let you guys know in the morning as it takes over an hour to complete the scan.

Mathieu.
 
I simply edited the /etc/nginx/nginx.conf file and added the directives in the http section.
Better remove it from there and instead create a separate configuration file in /etc/nginx/conf.d/ for it, because that will not be overwritten on the next update.
 
Hello Peter,

First, hurray, I passed PCI Scanning. It was easier than expected, I had already did a great job before the first scan it seems. I only had 4 things to fix and the 3 others I already knew how to fix them. Seems my experience over the years is paying off. :)

Yes, I figured that would happen (change to be overwritten by the next update) and will look into creating an additional conf file specifically for my modifications. Thanks for the reminder, it's appreciated. :D

Mathieu.
 
Back
Top