【发布时间】:2012-06-19 07:44:13
【问题描述】:
这应该是一个简单的问题,但我无法弄清楚。我有一个在机器上运行的网页,可以从本地网络访问。我想将在 cgi 下运行的脚本的结果重定向回我的 /var/www/index.html/ 文件。我试图在我的 /etc/apache2/apache2.conf 中放置一个重定向行,但它不起作用,所以我尝试了一个更简单的任务:
redirect permanent /var/www/index.html http://www.google.com
甚至这都行不通。
我做错了什么?
我在 Ubuntu 机器上运行它。
编辑:
这会在我重新启动服务器时添加到我的错误日志中:
[Sat Jun 16 17:26:36 2012] [notice] caught SIGTERM, shutting down | * Restarting web server apache2
[Sat Jun 16 17:26:36 2012] [notice] Apache/2.2.22 (Ubuntu) configured -- \|apache2: Could not reliably determine the server's fully qualified domain \
resuming normal operations
编辑:解决了一个新问题
我已经设法将网页重定向到谷歌,现在我想做实际的重定向。我已将此添加到我的 apache2.conf 文件中
Redirect permanent /cgi-bin/file.cgi /index.html
并删除了以前的文件。该文件现在被重定向到谷歌而不是回到我的主文件......
发生了什么事?
【问题讨论】:
-
您检查过您的 Apache 日志吗?它说什么?有没有错误?