Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: постоянное использование https
On Monday, June 15, 2009 at 11:34:19, Denis V. Roghnovskiy wrote:
>> в phpmyadmin проблема https решается кардинально по-другому,
>> через настройку fastcgi_param:
>> fastcgi_param HTTPS on;
>> там не надо рерайтов
DVR> Это если используется fastcgi.
для http proxy - аналогично.
========================================================================
nginx config:
=============
proxy_set_header X-Nginx-Scheme $scheme;
# nginx variable $scheme will be 'http' or 'https'.
apache config:
==============
SetEnvIf X-Nginx-Scheme "^https$" HTTPS=on
# Apache environment variable HTTPS will be 'on' or not defined.
PHP code:
=========
$scheme = getenv('HTTPS') && strtolower(getenv('HTTPS')) != 'off'
? 'https'
: 'http';
# PHP variable $scheme will be 'http' or 'https'.
========================================================================
--
Best regards,
Gena
|