joglomedia / LEMPer

LEMPer Stack is terminal-based LEMP / LNMP ( Linux, Nginx, MariaDB, PostgreSQL, MongoDB, Redis, Memcache, PHP, Secure FTP ) auto installer and virtual host manager for Debian & Ubuntu cloud or virtual server (vps) and on-premise (bare metal).

Home Page:https://lemper.cloud/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

joglomedia opened this issue · 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.