Re: постоянное использование https

Gena Makhomed gmm at csdoc.com
Mon Jun 15 13:42:52 MSD 2009


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






More information about the nginx-ru mailing list