Редирект для конфига nginx без учета 1С api.

Создайте файл /etc/nginx/helper/https_redirect.conf

_x000D_set $test 0;_x000D_if ($scheme = http) {_x000D_	set $test 1;_x000D_}_x000D_if ($http_x_forwarded_proto = http){_x000D_ set $test 1;_x000D_}_x000D_if ($http_x_forwarded_proto = https){_x000D_ set $test 0;_x000D_}_x000D_if ($request_uri ~ ^/api/1c_exchange.php*){_x000D_	set $test 0;_x000D_}_x000D_if ($test = 1){_x000D_	return 301 https://$host$request_uri;_x000D_}

В файле конфиге настройки сайта добавьте

_x000D_# Redirect to ssl_x000D_include helper/https_redirect.conf;