Ho un problema con il mio server che reindirizza http://www.mylesgray.com:8080/
->http://www.mylesgray.com/
.Che cosa sta causando questo reindirizzamento 301?
Qui sono i miei Nginx default
e fastcgi_params
config file:
https://gist.github.com/1745271
https://gist.github.com/1745313
questo è piuttosto un nusance come sto cercando di eseguire un punto di riferimento di Nginx w/caching vs Vernice con cache su Nginx per vedere se c'è un vantaggio in termini di prestazioni rispetto a uno rispetto all'altro.
Come tale devo dritto Nginx w/caching in ascolto sulla porta 8080
e vernice sulla porta 80
che inoltra le richieste non-cache a Nginx su localhost:8080
, quindi ovviamente quello che voglio fare è eseguire un ab
punto di riferimento sul http://www.mylesgray.com:8080/
e http://www.mylesgray.com/
per vedere la differenza.
Ecco i risultati di curl -I
su vari indirizzi.
# curl -I http://www.mylesgray.com:8080
HTTP/1.1 301 Moved Permanently
Server: nginx/0.7.65
Date: Sun, 05 Feb 2012 12:07:34 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PHP/5.3.2-1ubuntu4.7ppa5~lucid1
X-Pingback: http://www.mylesgray.com/xmlrpc.php
Location: http://www.mylesgray.com/
# curl -I http://mylesgray.com
HTTP/1.1 301 Moved Permanently
Server: nginx/0.7.65
Content-Type: text/html; charset=UTF-8
X-Powered-By: PHP/5.3.2-1ubuntu4.7ppa5~lucid1
X-Pingback: http://www.mylesgray.com/xmlrpc.php
Location: http://www.mylesgray.com/
Content-Length: 0
Date: Sun, 05 Feb 2012 12:15:51 GMT
X-Varnish: 1419774165 1419774163
Age: 15
Via: 1.1 varnish
Connection: keep-alive
# curl -I http://mylesgray.com:8080
HTTP/1.1 301 Moved Permanently
Server: nginx/0.7.65
Date: Sun, 05 Feb 2012 12:16:08 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
X-Powered-By: PHP/5.3.2-1ubuntu4.7ppa5~lucid1
X-Pingback: http://www.mylesgray.com/xmlrpc.php
Location: http://www.mylesgray.com/
poi eseguire curl -I http://www.mylesgray.com
dà:
# curl -I http://www.mylesgray.com
HTTP/1.1 200 OK
Server: nginx/0.7.65
Content-Type: text/html; charset=UTF-8
X-Powered-By: PHP/5.3.2-1ubuntu4.7ppa5~lucid1
X-Pingback: http://www.mylesgray.com/xmlrpc.php
Content-Length: 5132
Date: Sun, 05 Feb 2012 12:07:29 GMT
X-Varnish: 1419774133 1419774124
Age: 30
Via: 1.1 varnish
Connection: keep-alive
Quindi, come potete vedere 80
è servita da Varnish e 8080
da Nginx, ma non riesco a trovare ovunque tutto ciò che fa un redirect 301, non in nginx.conf
o nel file sites-enabled/default
e non credo che sia causato da Wordpress stesso ma molto aperto alla correzione.
Si prega di aiuto, questo mi sta facendo impazzire!
Myles
ho aggiunto questo al mio '/ etc/nginx/fastcgi_params' e riavviato tutti i servizi, ma arricciatura è ancora mostrando 301 del per tutti tranne' http: // www.mylesgray.com'. –
Ecco il mio conf sito 'default' e il mio file' fastcgi_params' rispettivamente: https://gist.github.com/1745271 e https://gist.github.com/1745313 –
Quale versione di nginx stai usando? Sovrascrivere le intestazioni delle richieste con fastcgi_param non è stato aggiunto fino a 0.8.40, a quanto pare. – kolbyjack