LEMPer icon indicating copy to clipboard operation
LEMPer copied to clipboard

[Improvement] Nginx doesn't forward the `HTTP_X_FORWARDED_PROTO` and `HTTPS` header

Open joglomedia opened this issue 3 years ago • 0 comments

Describe the Issue / Bug A clear and concise description of what the issue / bug is.

PHP application behind NGINX is unable to detect that HTTP_X_FORWARDED_PROTO or HTTPS secure connection is used. It seems that NGINX fastcgi params aren't set.

To Reproduce Steps to reproduce the behavior:

  1. Install LEMPer
  2. Add new site
  3. Enable SSL
  4. Use this SERVER params to test
<?php
echo "$_SERVER['HTTP_X_FORWARDED_PROTO']";
echo "$_SERVER['HTTPS']";

Expected Behavior A clear and concise description of what you expected to happen.

$_SERVER['HTTP_X_FORWARDED_PROTO'] should return https, and $_SERVER['HTTPS'] should return on

Screenshots / Screen Cast If applicable, add screenshots / screen cast to help explain your problem.

Config File (.env) If applicable, add part of your non-sensitive data from configuration file (.env).

System Information (please complete the following information):

  • OS:Rocky Linux 8.6 x86_64
  • Shell: bash 4.4.20
  • Version 2.6.4

Additional Context Add any other context about the problem here.

joglomedia avatar Aug 01 '22 17:08 joglomedia