Error: Too many redirect when redirect sharepoint site

sonpg nginx-forum at forum.nginx.org
Thu Feb 22 09:26:15 UTC 2018


I have a problem when i redirect sharepoint site, it get error "redirected
you too many times". I tried to clear cookie but not work

code:

user  nginx;
worker_processes  4;
error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;
events {
    worker_connections  1024;
}
http {
# Redirect sharepoint site
server {
    listen 80 ;
    server_name ecm.test.com;
    rewrite ^(.*) http://ecm.test.com permanent;
}


# Redirect http://test.com -> https://www.test.com
server {
listen 			80;
server_name 		www.test.com;
#rewrite ^(.*) https://www.test.com permanent;
return 301 https://$host$request_uri;

	}

# Redirect http://www.test.com -> https://www.test.com
server {
listen 			80;
server_name 		test.com;
rewrite ^(.*) https://www.test.com permanent;
#return 301 https://$host$request_uri;
	}	
### Reverse Proxy for WEB02
server {
listen 			443 ssl;
server_name 		www.test.com;
ssl              on;
### SSL cert files ###
       ssl_certificate      /etc/nginx/ssl/cert.pem;
       ssl_certificate_key  /etc/nginx/ssl/cert.key;

    	### ssl_ciphers          HIGH:!aNULL:!MD5;
		#ssl_ciphers RC4:HIGH:!aNULL:!MD5;
	    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
		ssl_prefer_server_ciphers on; 
		ssl_session_cache shared:SSL:10m;
		ssl_ciphers
"EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";

   	location / {
	proxy_set_header        X-Real-IP       $remote_addr;
	proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
     	proxy_pass 		https://web02.test.com;
	proxy_set_header 		host test.com;
		}

}	
###################
}

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,278716,278716#msg-278716



More information about the nginx mailing list