Welcome! Log In Create A New Profile

Advanced

Re: Передресация с http на https://

December 30, 2014 10:14AM
вот конфиг, прописал редирект c http://domain.me/manager на https://domain.me/manager вроде работает, а теперь как прописать редирект все остальное с https на http, помогите пожалуйста!

server {
server_name domain.me www.domain.me;
charset UTF-8;
disable_symlinks if_not_owner from=$root_path;
index index.html index.php;
root $root_path;
set $root_path /home/domain.me;
ssi on;
access_log /home/httpd-logs/domain.me.access.log ;
error_log /home/httpd-logs/domain.me.error.log notice;
include /etc/nginx/vhosts-includes/*.conf;

location ^~ /manager {
if ($scheme = http) {
return 301 https://$host$request_uri;
}
try_files $uri $uri/ @backend;
}

location / {
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
try_files $uri $uri/ @fallback;
}
location / {
try_files /does_not_exists @fallback;
}
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @fallback;
}
}
location @fallback {
error_log /dev/null crit;
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Secret GeBJ20wa6DzIiPCK;
access_log off ;
}
listen 123.123.123.123:80;
}

server {
server_name domain.me www.domain.me;
charset UTF-8;
disable_symlinks if_not_owner from=$root_path;
index index.html index.php;
root $root_path;
set $root_path /home/ziranov/data/www/domain.me;
ssi on;
access_log /home/httpd-logs/domain.me.access.log ;
error_log /home/httpd-logs/domain.me.error.log notice;
include /etc/nginx/vhosts-includes/*.conf;

location / {
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
try_files $uri $uri/ @fallback;
}
location / {
try_files /does_not_exists @fallback;

}
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @fallback;
}
}
location @fallback {
error_log /dev/null crit;
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Secret GeBJ20wa6DzIiPCK;
access_log off ;
}
listen 123.123.123.123:443;
ssl on;
ssl_certificate /var/www/httpd-cert/ziranov/domain.me.crt;
ssl_certificate_key /var/www/httpd-cert/ziranov/domain.me.key;
}
Subject Author Posted

Передресация с http на https://

hitarcher December 30, 2014 03:52AM

Re: Передресация с http на https://

foboss December 30, 2014 08:24AM

Re: Передресация с http на https://

hitarcher December 30, 2014 10:09AM

Re: Передресация с http на https://

hitarcher December 30, 2014 10:14AM

Re: Передресация с http на https://

foboss December 30, 2014 10:28AM

Re: Передресация с http на https://

hitarcher December 30, 2014 10:41AM

Re: Передресация с http на https://

mva December 30, 2014 11:50AM

Re: Передресация с http на https://

hitarcher December 30, 2014 11:51AM

Re: Передресация с http на https://

hitarcher December 30, 2014 11:52AM

Re: Передресация с http на https://

Daniel Podolsky December 30, 2014 12:58PM

Re: Передресация с http на https://

hitarcher December 30, 2014 01:15PM

Re: Передресация с http на https://

Daniel Podolsky December 30, 2014 01:42PM

Re: Передресация с http на https://

hitarcher December 30, 2014 01:51PM

Re: Передресация с http на https://

Daniel Podolsky December 30, 2014 02:12PM

Re: Передресация с http на https://

hitarcher December 30, 2014 02:24PM

Re: Передресация с http на https://

Andrey Kopeyko December 30, 2014 02:14PM

Re: Передресация с http на https://

hitarcher December 30, 2014 02:25PM

Re: Передресация с http на https://

hitarcher December 30, 2014 02:26PM

Re: Передресация с http на https://

mva December 30, 2014 02:30PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 50
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready