Sign in to follow this  
Followers 0
my_PYRAMID

ERR_TOO_MANY_REDIRECTS / WordPress

Am o problemă și nu am găsit o soluție pe înțelesul meu. Primesc eroarea aceasta când accesez /wp-admin: ERR_TOO_MANY_REDIRECTS 

 

Folosesc Webuzo ca panou de control: 

 

Z1Gz0IM.png

 

Nu mă lasă să pornesc Nginx de niciun fel. Cei de la găzduire m-au ajutat cu acest răspuns:

 

Quote

Din ce am observat webserverul Nginx nu porneste, din acesta cauza poate fi selectat , ERR_TOO_MANY_REDIRECTS este de obicei o problema a platformei, insa poate avea si cauze in configuararea webserverului. In logul Nginx apar urmatoarele erori:

 

2017/05/29 13:08:01 [warn] 11664#11664: invalid parameter "spdy": ngx_http_spdy_module was superseded by ngx_http_v2_module in /usr/local/apps/nginx/etc/conf.d/webuzoVH.conf:7 2017/05/29 13:08:01 [emerg] 11664#11664: invalid parameter "server_name" in /usr/local/apps/nginx/etc/conf.d/webuzoVH.conf:7 2017/05/29 13:09:25 [warn] 11965#11965: invalid parameter "spdy": ngx_http_spdy_module was superseded by ngx_http_v2_module in /usr/local/apps/nginx/etc/conf.d/webuzoVH.conf:7 2017/05/29 13:09:25 [emerg] 11965#11965: invalid parameter "server_name" in /usr/local/apps/nginx/etc/conf.d/webuzoVH.conf:7 2017/05/29 13:15:37 [warn] 12284#12284: invalid parameter "spdy": ngx_http_spdy_module was superseded by ngx_http_v2_module in /usr/local/apps/nginx/etc/conf.d/webuzoVH.conf:7 2017/05/29 13:15:37 [emerg] 12284#12284: invalid parameter "server_name" in /usr/local/apps/nginx/etc/conf.d/webuzoVH.conf:7 2017/05/29 13:16:01 [warn] 12353#12353: invalid parameter "spdy": ngx_http_spdy_module was superseded by ngx_http_v2_module in /usr/local/apps/nginx/etc/conf.d/webuzoVH.conf:7

 

Cum pot rezolva această eroare? Merci! :)

0

Share this post


Link to post
Share on other sites

Posted (edited)

La prima vedere ai o problema in fisierul /usr/local/apps/nginx/etc/conf.d/webuzoVH.conf pe linia 7. Erorile sunt legate de directiva spdy si de un paramtru server_name. Dar daca vrei sa te ajutam ne trebuie si noua mai multe informatii, cum ar fi, fisierul in discutie.

 

Presupun ca exista un load-balancer sau ceva in genul ala in fata webserver-ului tau si ala incearca in zadar sa redirectioneze traficul catre un webserver care merge, si tu avand doar unul intra intr-o bucla infinita de redirect-uri.

Edited by u0m3
Clarificari
0

Share this post


Link to post
Share on other sites

Posted (edited)

Scuzele mele. :)

 

nginx.conf

#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

pid		/usr/local/apps/nginx/var/log/nginx.pid;

events {
	worker_connections  1024;
}

error_log /usr/local/apps/nginx/var/log/error_log debug;


http {
	include	   mime.types;
	default_type  application/octet-stream;

	log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
					  '$status $body_bytes_sent "$http_referer" '
					  '"$http_user_agent" "$http_x_forwarded_for"';

	access_log /usr/local/apps/nginx/var/log/web.access.log  main;

	sendfile		on;
	#tcp_nopush	 on;

	#keepalive_timeout  0;
	keepalive_timeout  65;

	#gzip  on;
	
	client_max_body_size 200M;
	
	# If your domain names are long, increase this parameter.
	server_names_hash_bucket_size 64;
	
	# To hide the version number in headers
	server_tokens off;
	
	include /usr/local/apps/nginx/etc/conf.d/*.conf;
}

webuzoVH.conf

server {	
		listen		*:80;
	listen    	*:443 ssl spdy
		server_name	site.ro www.site.ro;
		# The Document Root
		root		/home/site.ro/public_html;
		
	rewrite 	^ https://forum.site.ro/ redirect;
		error_log	/usr/local/apps/nginx/var/log/site.ro.err;
		access_log	/usr/local/apps/nginx/var/log/site.ro.log main;
		
		ssl_certificate				/etc/ssl/cert/site.ro.crt;
		ssl_certificate_key			/etc/ssl/private/site.ro.key;
		ssl_dhparam					/etc/ssl/private/dhparam.pem;
		include		/usr/local/apps/nginx/etc/conf.d/common;
		
	}
	
	server {	
		listen		*:80;
	listen    	*:443 ssl spdy
		server_name	forum.site.ro 
www.forum.site.ro;
		# The Document Root
		root		/home/test/www/forum.site.ro;
		
		error_log	/usr/local/apps/nginx/var/log/forum.site.ro.err;
		access_log	/usr/local/apps/nginx/var/log/forum.site.ro.log main;
		
		ssl_certificate				/etc/ssl/cert/forum.site.ro-nginx-cabundle.crt;
		ssl_certificate_key			/etc/ssl/private/forum.site.ro.key;
		ssl_dhparam					/etc/ssl/private/dhparam.pem;
		include		/usr/local/apps/nginx/etc/conf.d/common;
		
	}
		
	
	server {	
		listen		*:80;
		server_name	site.ro www.site.ro;
		# The Document Root
		root		/home/narmer/www/site.ro;
		
		error_log	/usr/local/apps/nginx/var/log/site.ro.err;
		access_log	/usr/local/apps/nginx/var/log/site.ro.log main;
		
		include		/usr/local/apps/nginx/etc/conf.d/common;
		
	}

Merci mult!

Edited by my_PYRAMID
0

Share this post


Link to post
Share on other sites

Din cate observ sunt mai multe probleme:

  • lipseste un ";" dupa directiva "listen *:443 ssl spdy"
  • ai mai multe directive "server" pentru acelasi hostname; sincer nu stiu care are precedenta
  • in prima directiva "server" ai un rewrite incorect: formatul este rewrite <pcre regex expression> <replace expression>; presupun ca doreai sa faci redirect din http in https catre alt hosname (anume forum.site.ro), caz in care tot ce iti trebuie este
    server {	
    	listen		*:80;
    	server_name	site.ro www.site.ro;
    	return		301 https://forum.site.ro$request_uri;
    }
    daca vrei sa nu fie permanent redirect-ul, pune 302 in loc de 301; daca nu vrei sa tina cont de pagina ceruta, sterge $request_uri
  • mesajul 
    invalid parameter "spdy": ngx_http_spdy_module was superseded by ngx_http_v2_module in /usr/local/apps/nginx/etc/conf.d/webuzoVH.conf:7

    s-ar putea sa fie legat de versiunea nginx si modulele configurate; din cate am citit aici Please login or register to see this link.  eroarea asta ar aparea daca incerci sa folosesti atat spdy cat si http2 simultan, dar eu as interpreta-o altfel: conform documentatiei nginx, incepand cu versiunea 1.9.5, modulul http_v2 inlocuieste modulul spdy (fiind oarecum acelasi protocol)

In general este o idee buna sa verifici configuratia nginx folosind comanda "nginx -t" pentru a vedea eventualele erori. In general e mai clar ce este configurat incorect in output-ul acesta decat in logs.

 

Am observat ca ai si un Apache care ruleaza, care ar putea crea probleme in cazul in care asculta pe aceleasi porturi.

 

 

Ce am scris mai sus ar trebui sa rezolve macar erorile din logs. Daca eroarea ERR_TOO_MANY_REDIRECTS continua sa apara, dechide Developer Tools (presupun ca folosesti Google Chrome) si in tab-ul Network bifeaza Preserve log apoi da refresh la pagina si vezi header-ele HTTP ce zic.

 

 

Resurse folosite:

Please login or register to see this link.
Please login or register to see this link.
Please login or register to see this link.
Please login or register to see this link.
Please login or register to see this link.

1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0