Defender "Prevent Information Disclosure" correction gives 502

Hi - Happy New Year!
I´m following the guidelines of securing my site with defender.
I´m using an Easy Engine V4 nginx setup and are trying change the site specific conf file, with the code provided by Defender. I keep getting a Bad Gateway error though. Could you guys help me out?
Regards Karsten

  • viobru
    • Support

    Hi, Karsten Christrup!

    Thanks for contacting us, hope you are doing great :slight_smile:

    Could you please specify where/when are you getting that error? Is it happening when trying to access the site, maybe?

    FYI, 502 Bad Gateway signals a request for either a page, script, process, or query has taken too long to complete and has been cancelled (killed). The digits, 5xx and 02, are HTTP Status Codes which correspond to 5xx meaning Server Error while 02 refers to Bad Gateway.
    Here you can find more information about What is a 502 Bad Gateway Error (And How Can I Fix It)?.

    Since you mention that the issue started right after editing the .conf file on the server, I guess that you are referring to the tweak of "Prevent Information Disclosure", am I right? If so, please make sure that the code is properly added in the .conf file. It should be placed right before the php location block, that should look as something like:
    location ~ \.php$ {
    Please note that, on some servers, the default .conf file might be skipped and rather a site specific .conf file is used. So you need to make sure that you are using the correct file. I'd rather advise to contact your hosting provider about it, they should be able to locate the proper file for you in no time. Please check it and, if you are sure to be using the right file and that the code is properly placed on it, could you please attach your complete .conf file content including the code suggested by Defender? Please copy the content directly on this thread or attach the file with a .txt or .pdf extension so we can check it. Many thanks in advance.

    Have a nice day ahead and Happy New Year!

    Kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.