我无法让dwww工作 – 继续获得404 Not Found
当我尝试点击dwww生成的网页上的链接时 – 我收到以下错误:
Not Found The requested URL /cgi-bin/dwww/usr/share/doc/ was not found on this server. Apache/2.4.10 (Ubuntu) Server at randys-laptop Port 80
我已经安装了Debian文档浏览器包。
我究竟做错了什么?
dwww
使用cgi
来提供网页,默认情况下不再在apache2
启用cgi
; 所以你需要启用cgi
:
sudo a2enmod cgi
然后使用以下命令重启apache2
服务:
service apache2 restart
这将解决您在dwww
返回not found
遇到的主要问题。
但是你可能会遇到另一个问题。 dwww
允许从Web服务器访问/var/www/dwww
和/usr/share/doc
(它将跟随其他目录中的符号链接到/usr/share/doc
)。
您可能会发现的其他问题是某些文档文件不在/usr/share/doc
。
例如(这取决于您安装的文档), /usr/share/gtk-doc/html
中的某些目录符号链接到/usr/share/doc/...
这些将显示是没有问题的dwww
。
但其他文件不会也不会自动显示。 例如, /usr/share/gtk-doc/html/atk
目录不使用符号链接到/usr/share/doc
。 尝试使用dwww
打开这些文件dwww
导致:
dwww will not allow you to read the file /usr/share/gtk-doc/html/atk/index.html
这可能是一个涉及apache2
/ dwww
配置的解决方案; 但我不是apache2
安全专家,也不想引入问题。
简单的解决方法是使用file://
协议来查找发现此问题的那些(非常)少数文件。
对于上面的atk
文档示例,生成的url是:
http:///cgi-bin/dwww/usr/share/gtk-doc/html/atk/index.html?type=html
您可以转到地址栏并将其编辑为:
file:///usr/share/gtk-doc/html/atk/index.html?type=html
然后加载该文件。