0

我只想在我的本地计算机上使用 APE。这是我第一次在运行 ubuntu 的虚拟机上安装 APE,并使用 local.ape-project.org/APE_JSF/Tools/Check/ 上的检查工具在 VM 中成功测试了它。我很高兴收到粗体消息“所有测试完成。现在你可以玩你的 APE”了。

现在我试图更进一步。我试图从运行 windows7 的主机访问同一侧并进行了相同的测试。我收到错误,因为检查工具最后尝试联系猿服务器并显示以下消息“无法联系 APE 服务器。请检查以下 url 是否指向您的 APE 服务器:http://0.ape。 local.ape-project.org:6969如果我在主机上检索http://local.ape-project.org:6969/我会得到带有标题“APE 服务器”的猿默认页面,这表明猿服务器是可从主机访问。所以我忘记了什么?

一个 apache 服务器在它旁边运行在端口 80 上。

虚拟机的内部静态 IP 目前是 192.168.178.5 所以我在 C:\WINDOWS\system32\drivers\etc\hosts 文件中添加了以下几行,就像 ape-project.org 上的手册指定的那样......

192.168.178.5   local.ape-project.org
192.168.178.5   ape.local.ape-project.org
192.168.178.5   0.local.ape-project.org
192.168.178.5   1.local.ape-project.org
192.168.178.5   2.local.ape-project.org
192.168.178.5   3.local.ape-project.org
192.168.178.5   4.local.ape-project.org
192.168.178.5   5.local.ape-project.org
192.168.178.5   6.local.ape-project.org
192.168.178.5   7.local.ape-project.org
192.168.178.5   8.local.ape-project.org
192.168.178.5   9.local.ape-project.org

我的 APE 配置文件的前两个部分如下所示

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

Server {
    port = 6969
    daemon = yes
    ip_listen = 0.0.0.0 // i also tried to bind it on the internal ip (does not work)
    domain = ape-project.org
    rlimit_nofile = 10000
    pid_file = /var/run/aped.pid
}

[...]

APE JSF 有以下配置(config.js)

/***
 * APE JSF Setup
 */

APE.Config.baseUrl = 'http://local.ape-project.org/APE_JSF'; //APE JSF 
APE.Config.domain = 'ape-project.org'; 
APE.Config.server = 'ape.local.ape-project.org:6969'; //APE server URL

我检索 apache2 的默认页面以访问我的网站(.../apache2/sites-available/default)

<VirtualHost *:80>
        ServerName local.ape-project.org
        ServerAlias ape.local.ape-project.org
        ServerAlias *.ape.local.ape-project.org

    ServerAdmin webmaster@localhost

    DocumentRoot /home/kuro/Shares/Web/JSF/Website/
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /home/kuro/Shares/Web/JSF/Website/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

...
..
.

</VirtualHost>
4

1 回答 1

0

Omg, it's just a simple mistake!!! I've found the issue in the C:\WINDOWS\system32\drivers\etc\hosts file and forgot to write "ape" in front of the domain -.- It must be look like this:

192.168.178.5   local.ape-project.org
192.168.178.5   ape.local.ape-project.org
192.168.178.5   0.ape.local.ape-project.org
192.168.178.5   1.ape.local.ape-project.org
192.168.178.5   2.ape.local.ape-project.org
192.168.178.5   3.ape.local.ape-project.org
...

That's why i lost few hours for running my ape server from host... Now it works fine!

于 2011-09-20T12:34:54.280 回答