小编Pin*_*ing的帖子

Nginx + Nodejs:连接上游时上游超时(110:连接超时)

我正在使用 Nginx 反向代理,因此当访问者查看 example.com 时,他们实际上正在查看 example.com:8888。以前它工作正常,但今天早上突然无法通过域访问,但仍然可以使用端口 8888 的 IP 地址访问。

所以我怀疑这个问题是由 Nginx 引起的,当我查看日志时,我发现多行显示upstream timed out错误,我发现上游 IP 地址是 Cloudflare 的 IP(我将我的域指向 Cloudflare)。

我不确定为什么它突然不能再访问了。任何人都可以提供帮助?谢谢。这是错误日志:

2017/07/17 07:53:41 [error] 25707#25707: *31 no live upstreams while connecting to upstream, client: [MY IP], server: www.example.com$, request: "GET / HTTP/1.1", upstream: "http://www.example.com/", host: "www.example.com"
2017/07/17 07:53:41 [error] 25707#25707: *33 upstream timed out (110: Connection timed out) while connecting to upstream, client: [MY IP], server: www.example.com$, request: "GET / HTTP/1.1", upstream: "http://104.18.51.97:8888/", host: "www.example.com"
Run Code Online (Sandbox Code Playgroud)

这是 Nginx …

ubuntu reverse-proxy nginx node.js cloudflare

6
推荐指数
0
解决办法
1599
查看次数

htaccess重写没有.php扩展名到文件的URL

我有一个使用osCommerce的网站,所有页面都可以直接访问http://www.example.com/pagename.php,但现在我想调整htaccess文件,以便它可以支持http://www.example.com/username然后重定向到http://www.example.com/account.php?id=username,而其他页面仍然可以使用相同的旧方式访问.

这意味着如果htaccess检测到URL没有任何扩展名,那么它将重定向到http://www.example.com/account.php?id=username.

谢谢!

php apache .htaccess mod-rewrite url-rewriting

2
推荐指数
1
解决办法
6856
查看次数