gpt4 book ai didi

linux - 是什么导致了这个 301 重定向?

转载 作者:IT王子 更新时间:2023-10-29 00:12:08 24 4
gpt4 key购买 nike

<分区>

我的服务器重定向 http://www.mylesgray.com:8080/ -> http://www.mylesgray.com/ 时出现问题。

这是我的 Nginx defaultfastcgi_params 配置文件:

https://gist.github.com/1745271

https://gist.github.com/1745313

这相当麻烦,因为我正在尝试运行 带缓存的 Nginx在 Nginx 之上带缓存的 Varnish 的基准测试,看看是否有任何一个比另一个的性能优势。

因此,我有直接的 Nginx w/缓存监听端口 8080 和 varnish 在端口 80 上转发任何非缓存请求到 localhost 上的 Nginx: 8080,所以很明显我想做的是在 http://www.mylesgray.com:8080/ 上运行一个 ab 基准测试http://www.mylesgray.com/ 查看区别。

这是 curl -I 在不同地址上的结果。

# 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/

然后运行 ​​curl -I http://www.mylesgray.com 给出:

# 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

正如您所看到的,80 由 Varnish 提供,8080 由 Nginx 提供,但我找不到 anywhere 任何执行 301 重定向的东西,不在 nginx.confsites-enabled/default 文件中,我不认为这是由 Wordpress 本身引起的,但非常愿意更正。

请帮忙,这让我抓狂!

迈尔斯

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com