<div dir="ltr">Отчего же, ответил именно на поставленный вопрос. Да, правда вижу опечатку в примере, там вот так должно быть:<br><br><div style="font-size:13px"><div>server {</div><div> listen <a href="http://192.168.7.1/" target="_blank">192.168.7.1:80</a> default_server;</div><div> listen <a href="http://192.168.7.2:443/" target="_blank">192.168.7.2:443</a> ssl default_server;</div><div> server_name <a href="http://example.com/" target="_blank">example.com</a>;</div><div><br></div># HTTP -> HTTPS</div><div style="font-size:13px"> location /manager {</div><div style="font-size:13px"> if ($scheme = http) { rewrite ^(.*) https://$server_name$1 permanent; }</div><div style="font-size:13px"> <...> <br></div><div style="font-size:13px"> }</div><div class="gmail_extra" style="font-size:13px"><br># HTTPS -> HTTP</div><div class="gmail_extra" style="font-size:13px"><div> location / {</div><div> if ($scheme = https) { rewrite ^(.*) http://$server_name$1 permanent; }</div><div> <...> <br></div><div> }</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 30, 2014 at 6:14 PM, hitarcher <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">вот конфиг, прописал редирект c <a href="http://domain.me/manager" target="_blank">http://domain.me/manager</a> на<br>
<a href="https://domain.me/manager" target="_blank">https://domain.me/manager</a> вроде работает, а теперь как прописать редирект<br>
все остальное с https на http, помогите пожалуйста!<br>
<br>
server {<br>
server_name <a href="http://domain.me" target="_blank">domain.me</a> <a href="http://www.domain.me" target="_blank">www.domain.me</a>;<br>
charset UTF-8;<br>
disable_symlinks if_not_owner from=$root_path;<br>
index index.html index.php;<br>
root $root_path;<br>
set $root_path /home/<a href="http://domain.me" target="_blank">domain.me</a>;<br>
ssi on;<br>
access_log /home/httpd-logs/domain.me.access.log ;<br>
error_log /home/httpd-logs/domain.me.error.log notice;<br>
include /etc/nginx/vhosts-includes/*.conf;<br>
<br>
location ^~ /manager {<br>
if ($scheme = http) {<br>
return 301 https://$host$request_uri;<br>
}<br>
try_files $uri $uri/ @backend;<br>
}<br>
<br>
location / {<br>
location ~*<br>
^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {<br>
try_files $uri $uri/ @fallback;<br>
}<br>
location / {<br>
try_files /does_not_exists @fallback;<br>
}<br>
location ~ [^/]\.ph(p\d*|tml)$ {<br>
try_files /does_not_exists @fallback;<br>
}<br>
}<br>
location @fallback {<br>
error_log /dev/null crit;<br>
proxy_pass <a href="http://127.0.0.1:8080" target="_blank">http://127.0.0.1:8080</a>;<br>
proxy_redirect <a href="http://127.0.0.1:8080" target="_blank">http://127.0.0.1:8080</a> /;<br>
proxy_set_header Host $host;<br>
proxy_set_header X-Forwarded-For<br>
$proxy_add_x_forwarded_for;<br>
proxy_set_header X-Forwarded-Proto $scheme;<br>
proxy_set_header X-Forwarded-Secret GeBJ20wa6DzIiPCK;<br>
access_log off ;<br>
}<br>
listen <a href="http://123.123.123.123:80" target="_blank">123.123.123.123:80</a>;<br>
}<br>
<br>
server {<br>
server_name <a href="http://domain.me" target="_blank">domain.me</a> <a href="http://www.domain.me" target="_blank">www.domain.me</a>;<br>
charset UTF-8;<br>
disable_symlinks if_not_owner from=$root_path;<br>
index index.html index.php;<br>
root $root_path;<br>
set $root_path /home/ziranov/data/www/<a href="http://domain.me" target="_blank">domain.me</a>;<br>
ssi on;<br>
access_log /home/httpd-logs/domain.me.access.log ;<br>
error_log /home/httpd-logs/domain.me.error.log notice;<br>
include /etc/nginx/vhosts-includes/*.conf;<br>
<br>
location / {<br>
location ~*<br>
^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {<br>
try_files $uri $uri/ @fallback;<br>
}<br>
location / {<br>
try_files /does_not_exists @fallback;<br>
<br>
}<br>
location ~ [^/]\.ph(p\d*|tml)$ {<br>
try_files /does_not_exists @fallback;<br>
}<br>
}<br>
location @fallback {<br>
error_log /dev/null crit;<br>
proxy_pass <a href="http://127.0.0.1:8080" target="_blank">http://127.0.0.1:8080</a>;<br>
proxy_redirect <a href="http://127.0.0.1:8080" target="_blank">http://127.0.0.1:8080</a> /;<br>
proxy_set_header Host $host;<br>
proxy_set_header X-Forwarded-For<br>
$proxy_add_x_forwarded_for;<br>
proxy_set_header X-Forwarded-Proto $scheme;<br>
proxy_set_header X-Forwarded-Secret GeBJ20wa6DzIiPCK;<br>
access_log off ;<br>
}<br>
listen <a href="http://123.123.123.123:443" target="_blank">123.123.123.123:443</a>;<br>
ssl on;<br>
ssl_certificate /var/www/httpd-cert/ziranov/domain.me.crt;<br>
ssl_certificate_key /var/www/httpd-cert/ziranov/domain.me.key;<br>
}<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?21,255869,255883#msg-255883" target="_blank">http://forum.nginx.org/read.php?21,255869,255883#msg-255883</a><br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-ru" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Best regards, Juriy Strashnov<br><br>Mob. +7 (953) 742-1550<br>E-mail: <a href="mailto:j.strashnov@me.com" target="_blank">j.strashnov@me.com</a><br><br>Please consider the environment before printing this email.</div>
</div>