- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我已经通过代理、proxy_http 模式使用 Apache 服务器配置了 Node.js 服务器,并且工作正常。但是现在,当我启动 Node.js 服务器时,我在 ssh 控制台上收到正在运行的通知消息:“好的,服务器正在运行”,但是当我通过浏览器访问 Node.js 服务器时 http://example.com/node/
,我收到 502 错误(代理错误) - 在我获得 200 状态之前!
我不知道为什么现在我无法获得 200 状态!我没有对 Node.js 服务器文件进行任何更改。所有者是 root:root。我重新启动了 Ubuntu 12.04 服务器,重新启动后它就可以工作了。
模块 proxy 和 proxy_http 已启用。
我从 Apache 日志中收到以下错误:
(20014)Internal error: proxy: error reading status line from remote server localhost:9000
proxy: Error reading from remote server returned by /node
下面是启用代理的站点可用 /etc/apache2/sites-available/example.com
配置
<VirtualHost *:80>
.
.
ProxyPass /n http://localhost:9000/
ProxyPassReverse /n http://localhost:9000/
.
.
</VirtualHost>
Node.js 服务器代码:
var http=require('http');
var mysql = require('mysql');
var util = require('util');
var url = require('url');
var server=http.createServer(function(req,res){
//res.end('Connected');
});
server.on('listening',function(){
console.log('ok, server is running');
});
server.listen(9000);
我非常感谢您的意见,因为我已经尝试了很多但没有运气:(
谢谢。
最佳答案
如果我在服务器上评论响应,那么它将不起作用并会收到错误 502。应该是:
var server=http.createServer(function(req,res){
res.end('Connected');
});
关于javascript - 浏览 Node.js 服务器时出现 502(代理错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23598948/
我遇到一个问题,即我的抓取工具正在跳过没有浏览引荐来源网址的浏览页面。我正在尝试解析 URL 中包含/browse/的所有页面,无论引用者如何。 以下是我的代码(根据 paul t 更新): from
我有4个屏幕。 X,A,B,C。导航模式应如下所示 这是代码 X 屏幕 class X extends StatelessWidget { @override Widget build(Bui
我想用 java 编写一个简单的网络浏览器,这是我的代码! import javax.swing.*; import java.io.*; import java.awt.*; import java
这个问题在这里已经有了答案: A home button in iOS 5, xcode 4.2, Story board (2 个回答) 8年前关闭。 来自 FirstView到SecondView
我使用 C#/ASP.Net 在 IIS7 中创建虚拟目录,以便外部人员可以浏览各种文档。 一切看起来都不错,除了浏览是一种沉闷的文本格式。当他们浏览到文件夹时,我如何创建更多的“Windows 资源
我想我在 Chrome 或 Internet Explorer 中见过 Gmail 这样做,但我从未在 Firefox 中见过它。我想我还是会问一下。是否可以在不需要的情况下进行文件上传?我看到你可以
我是 Java 的新手,作为第一次阅读,我阅读了几本有关 Java 语言的书籍。 我有几个关于 Java 文档的问题。如何“导航”它们?是否可以仅使用 Javadoc 来学习新概念? 这是一个示例 -
我有一个解析网络,现在我想浏览标签,或显示图表。我怎样才能得到图表?或者在树中导航。显示第一步然后其他等。并了解这棵树是如何 build 的。 import urllib from lxml impo
考虑以下情况: 杀戮戒指中的 N 项。需要拉取的项目是项目#k 数值论证解决方案不会真正起作用,因为计算或跟踪杀死环中事物的位置很烦人。 最佳答案 实际问题是什么?按 C-y 然后按 M-y k 次有
这是我之前的 question 的后续。 我试图从 here 了解 Haskell 中的列表拆分示例: foldr (\a ~(x,y) -> (a:y,x)) ([],[]) 我可以阅读 Haske
是否有任何 vim 工具通过 Latex 文档结构提供有效的导航。拥有像 NERDTree 面板这样的东西来表示 latex 文档的部分/子部分结构会非常有用。 最佳答案 扩展 mnosefishs
您好,我的应用程序中有一个模态视图 Controller ,当按下某个按钮时,该 Controller 会消失,并且其中带有 UITableView 的 View 会使用导航 Controller 滑
Glances v2.11.1 with psutil v5.4.3 /usr/lib/python3.6/site-packages/psutil/_pslinux.py:1152: Runtime
我正在使用 Eclipse,我希望我可以通过按 STRG 在以驼峰式书写的单词之间跳转。现在我正在使用 Sublime,我找不到这样做的快捷方式,也找不到实现它的插件。 下面的例子说明了我的问题 aF
我的主程序提示用户浏览文件以便使用 ffmpeg 进行转换。这是文件浏览的格式: 1. Select audio file for conversion ( mp3, wma):
我正在尝试浏览 SVN 存储库,而不必检查它: 是否可以在本地(Unix 上)执行此操作? 这可以通过 ssh 访问实现吗? 最佳答案 svn ls 有效。例如 svn ls http://my.sv
我有一个网站,其中列出了数据库中的企业列表。在每个页面上,您可以执行不同的操作,例如将其转发给 friend 、打印页面等。我的问题是我可以使用谷歌分析来跟踪每个列表的展示次数和浏览次数吗?因此,如果
在 Dart 我有一个嵌套的元素列表 void main() { var diction = {'1':'Alpha','2':'Beta','3':{'x':'Football','y':'
当我们的用户单击网页上的浏览按钮来上传任何文件时,我想更改窗口位置。我会给你一个场景 - 我的 html 表单上有一个浏览按钮,当用户单击一个弹出窗口时,该位置默认为“我的文档”。 实际上我想在单击“
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve th
我是一名优秀的程序员,十分优秀!