开发者

Can't contact Ape-Server on VM from Host

i just want to use APE on my local computer. It's my first time i installed APE on a virtual machine running ubuntu and i tested it in the VM with the check-tool on local.ape-project.org/APE_JSF/Tools/Check/ successfully. I got happily the bold message "All test done. Now you can play with your APE".

Now i tried to take a step further. I tried to access the same side from host running windows7 and made the same test. I got an error as the check-tool tried to contact the ape server at the end with the following message "Can't contact APE Server. Please check the folowing url is pointing to your APE server : http://0.ape.local.ape-project.org:6969. If i retrieve http://local.ape-project.org:6969/ on host i get the ape default page with the headline "APE Server" which shows me that the ape server is accessible from host. So what did i forgot?

An apache server runs besi开发者_StackOverflow中文版des it on port 80.

The internal static IP of the virtual machine is at the moment 192.168.178.5 so i added the following lines to the C:\WINDOWS\system32\drivers\etc\hosts file like the manual on ape-project.org specifies...

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

The first two sections of my APE config-file looks like the following

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 has the following configuration (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

I retrieve the default page of apache2 to access my webside (.../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>


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜