javascript - Apache Web 服务器消息

标签 javascript eclipse apache tomcat d3.js

<分区>

我正在尝试通过以下链接设置 d3 Javascript:

https://github.com/mbostock/d3/wiki . I am currently using Eclipse Juno and Tomcat in Mac 10.5.8. basically I am trying to run a simple Force-Directed graph example that was taken from the following link: https://gist.github.com/mbostock/4062045

有人建议我将下面的命令插入到终端中,以便让 d3 运行:

python -m SimpleHTTPServer 8888 &

使用 Web 浏览器(在我的例子中是 Firefox),我可以插入:

http://localhost:8888/

.当我这样做时,我在浏览器中收到以下消息:

If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page. Seeing this instead of the website you expected?

This page is here because the site administrator has changed the configuration of this web server. Please contact the person responsible for maintaining this server with questions. The Apache Software Foundation, which wrote the web server software this site administrator is using, has nothing to do with maintaining this site and cannot help resolve configuration issues. The Apache documentation has been included with this distribution. You are free to use the image below on an Apache-powered web server. Thanks for using Apache!

该消息是什么意思,为什么我会收到此类消息?只要我收到此消息,我怎样才能让 d3 运行?

最佳答案

看起来 Apache 和 python 正在争夺同一个端口,并且由于您在后台模式下启动 python,它没有正确报告错误。

尝试开始python -m SimpleHTTPServer没有争论。它应该从端口 8000 开始并从它启动的文件夹中提供文件。

接下来的步骤是将 html 文件和 json 文件移动到您启动服务器的同一文件夹中。然后将浏览器指向 http://localhost:8000/<name-of-your-html-file>.html .

关于javascript - Apache Web 服务器消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19892999/

相关文章:

eclipse - Kepler下无法安装Maven for Eclipse 1.5.0插件

java - 需要创建 Java JAR 文件并将其添加到 Maven Dependency

regex - htaccess 将所有图像重定向到不同的位置并将图像名称放入新的 url

Apache grep 大日志文件

用于正则表达式查找价格和检测货币的 JavaScript 函数

javascript - 启动页面视频(jQuery 隐藏)显示问题下方的索引

eclipse - JPA 与 hibernate 错误 : [PersistenceUnit: JPA] Unable to build EntityManagerFactory

c - 如何从 Apache Web 服务器输入过滤器返回 HTTP 403?

javascript - 如何像 Ember.js 那样抽象 ajax 请求的异步行为?

javascript - 如何将此 Node.js 中的函数导出到另一个模块中