AJAX 推送引擎:无法联系 APE 服务器

发布于 2024-09-09 06:26:09 字数 2886 浏览 7 评论 0原文

我正在尝试在运行 Mac OS X 10.6.4 和 Apache 2.2.14 的 Mac 上设置 AJAX 推送引擎 (APE)

当我运行 APE 服务器时,输出如下:

Hristo$ sudo ./aped
Password:
   _   ___ ___ 
  /_\ | _ \ __|
 / _ \|  _/ _| 
/_/ \_\_| |___|
AJAX Push Engine

Bind on port 6969

Version : 1.00
Build   : Dec  7 2009 23:05:18
Author  : Weelya ([email protected])

[Module] [spidermonkey] Loading module : Javascript embeded (0.01) - Anthony Catel
[JS] Loading script ../scripts/framework/mootools.js
[JS] Loading script ../scripts/framework/Http.js
[JS] Loading script ../scripts/framework/userslist.js
[JS] Loading script ../scripts/utils/utils.js
[JS] Loading script ../scripts/commands/proxy.js
[JS] Loading script ../scripts/commands/inlinepush.js
[JS] Loading script ../scripts/examples/nickname.js
[JS] Loading script ../scripts/examples/move.js
[JS] Loading script ../scripts/utils/checkTool.js

ape.conf< /code> 看起来像:

uid {
        # "aped" switch to this user/group if it run as root
        user = daemon
        group = daemon
}


Server {
        port = 6969
        daemon = no
        ip_listen = 127.0.0.1
        domain = localape
        rlimit_nofile = 10000
        pid_file = /var/run/aped.pid
}

Log {
        debug = 1
        use_syslog = 0
        logfile = ./ape.log
}

JSONP {
        eval_func = Ape.transport.read
        allowed = 1
}

Config {
#relative to ape.conf
        modules = ../modules/lib/
        modules_conf = ../modules/conf/
}

# Proxy section is used to resolve hostname and allow access to a IP:port (Middleware-TCPSocket feature)

#Proxy {
#       id = freenode
#       host = irc.freenode.net
#       port = 6667
#       readonly = false
#}

... httpd-vhosts.conf 文件中的虚拟主机内容看起来像:

#
# Virtual Hosts
#

<Directory /Library/WebServer/Documents/APE>
   Order Deny,Allow
   Allow from all
</Directory>

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>

<VirtualHost *:80>
   Servername localape
   ServerAlias ape.localape
   ServerAlias *.ape.localape

   DocumentRoot "/Library/WebServer/Documents/APE"
</VirtualHost>

当我在 /Tools/Check/index.html 中运行测试文件时,我通过了测试,直到到达 APE 服务器,出现以下错误:

Running test : Contacting APE Server
Can't contact APE Server. Please check the your APE Server is running and the folowing url is pointing to your APE server : http://ape.localape:6969
Something went wrong. If you can't fix it by yourself post a message on the newsgroups with the output below or join our IRC channel

关于如何解决此问题有任何想法吗?

谢谢。

I'm trying to set up the AJAX Push Engine (APE) on my Mac, running Mac OS X 10.6.4 and Apache 2.2.14

When I run the APE server, this is the output:

Hristo$ sudo ./aped
Password:
   _   ___ ___ 
  /_\ | _ \ __|
 / _ \|  _/ _| 
/_/ \_\_| |___|
AJAX Push Engine

Bind on port 6969

Version : 1.00
Build   : Dec  7 2009 23:05:18
Author  : Weelya ([email protected])

[Module] [spidermonkey] Loading module : Javascript embeded (0.01) - Anthony Catel
[JS] Loading script ../scripts/framework/mootools.js
[JS] Loading script ../scripts/framework/Http.js
[JS] Loading script ../scripts/framework/userslist.js
[JS] Loading script ../scripts/utils/utils.js
[JS] Loading script ../scripts/commands/proxy.js
[JS] Loading script ../scripts/commands/inlinepush.js
[JS] Loading script ../scripts/examples/nickname.js
[JS] Loading script ../scripts/examples/move.js
[JS] Loading script ../scripts/utils/checkTool.js

The ape.conf looks like:

uid {
        # "aped" switch to this user/group if it run as root
        user = daemon
        group = daemon
}


Server {
        port = 6969
        daemon = no
        ip_listen = 127.0.0.1
        domain = localape
        rlimit_nofile = 10000
        pid_file = /var/run/aped.pid
}

Log {
        debug = 1
        use_syslog = 0
        logfile = ./ape.log
}

JSONP {
        eval_func = Ape.transport.read
        allowed = 1
}

Config {
#relative to ape.conf
        modules = ../modules/lib/
        modules_conf = ../modules/conf/
}

# Proxy section is used to resolve hostname and allow access to a IP:port (Middleware-TCPSocket feature)

#Proxy {
#       id = freenode
#       host = irc.freenode.net
#       port = 6667
#       readonly = false
#}

... and the virtual host stuff in the httpd-vhosts.conf file looks like:

#
# Virtual Hosts
#

<Directory /Library/WebServer/Documents/APE>
   Order Deny,Allow
   Allow from all
</Directory>

#
# Use name-based virtual hosting.
#
NameVirtualHost *:80

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>

<VirtualHost *:80>
   Servername localape
   ServerAlias ape.localape
   ServerAlias *.ape.localape

   DocumentRoot "/Library/WebServer/Documents/APE"
</VirtualHost>

When I run the test file in /Tools/Check/index.html, I pass the tests until I get to the APE Server where I get the following error:

Running test : Contacting APE Server
Can't contact APE Server. Please check the your APE Server is running and the folowing url is pointing to your APE server : http://ape.localape:6969
Something went wrong. If you can't fix it by yourself post a message on the newsgroups with the output below or join our IRC channel

Any ideas as to how to fix this?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猫烠⑼条掵仅有一顆心 2024-09-16 06:26:09

我想通了。部分问题是我所在的网络不允许我做这种事情。一旦我转移到普通网络,我就进行了更改并且它起作用了。

以下是APE的配置文件。我在这里所做的唯一更改是前两部分:

uid {
        # "aped" switch to this user/group if it run as root
        user = Hristo
        group = admin
}


Server {
        port = 6969
        daemon = no
        ip_listen = 127.0.0.1
        domain = local.ape-project.org
        rlimit_nofile = 10000
        pid_file = /var/run/aped.pid
}

接下来,我更改了位于 /etc/apache2/extra/ 的虚拟主机文件 httpd-vhosts.conf 中的一些内容代码>.它是这样的:

<Directory /Library/WebServer/Documents/APE>
   Order Deny,Allow
   Allow from all
</Directory>

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>

<VirtualHost *:80>
   Servername local.ape-project.org
   ServerAlias ape.local.ape-project.org
   ServerAlias *.ape.local.ape-project.org
   DocumentRoot "/Library/WebServer/Documents/APE"
</VirtualHost>

所以这意味着我必须在位于 /etc/apache2 的 Apache 配置文件 httpd.conf 中包含虚拟主机。为此,我取消了位于文件底部的以下行的注释:

# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

最后,我将 local.ape-project.org 添加到 hosts 文件中>/etc/:

127.0.0.1       local.ape-project.org

我使用以下来源来指导我: http://www.ape-project.org/wiki/index.php/Advanced_APE_configuration

希望这会有所帮助。

I figured it out. Part of the problem was that the network I was on didn't allow me to do this kind of thing. Once I moved to a normal network, I made changes and it works.

The following is the configuration file for APE. The only changes I made here were in the first two sections:

uid {
        # "aped" switch to this user/group if it run as root
        user = Hristo
        group = admin
}


Server {
        port = 6969
        daemon = no
        ip_listen = 127.0.0.1
        domain = local.ape-project.org
        rlimit_nofile = 10000
        pid_file = /var/run/aped.pid
}

Next, I changed some things in the virtual hosts file httpd-vhosts.conf located in /etc/apache2/extra/. This is what it looks like:

<Directory /Library/WebServer/Documents/APE>
   Order Deny,Allow
   Allow from all
</Directory>

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "/Library/WebServer/Documents"
</VirtualHost>

<VirtualHost *:80>
   Servername local.ape-project.org
   ServerAlias ape.local.ape-project.org
   ServerAlias *.ape.local.ape-project.org
   DocumentRoot "/Library/WebServer/Documents/APE"
</VirtualHost>

So this means I have to include virtual hosts in the Apache configuration file httpd.conf located in /etc/apache2. To this, I uncommented the following line which is located towards the bottom of the file:

# Virtual hosts
Include /private/etc/apache2/extra/httpd-vhosts.conf

Finally, I added local.ape-project.org to the hosts file in /etc/:

127.0.0.1       local.ape-project.org

I used the following source to guide me: http://www.ape-project.org/wiki/index.php/Advanced_APE_configuration

Hope this helps.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文