ykuj 发表于 2014-12-8 09:40:01

虚拟目录下apache点击报The requested URL* was not found on this server.

首先,我yum的httpd,把备份好的文件会存到/data/backup,并且在http.conf中配置虚拟目录

1
2
3
4
5
6
7
alias /mogodb/ "/data/backup"
<Directory "/data/backup">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>




当我访问 http://host/mogodb/可以看到当前文件夹的list
但是,我点击其中的选项需要下载的时候,弹出了404

1
The requested URL /mogodb/xxxx.tar.gz was not found on this server.




然后查了好久,终于在官网的手册中找到了


1
then the URL /icons will not be aliased, as it lacks that trailing /. Likewise, if you omit the slash on the URL-path then you must also omit it from the file-path.




参照我的第一跳配置,意思就是说,alias两个路径要不都写上尾随的'/',要不都别写‘/’(英语渣渣,求别吐槽)
所以最终解决办法就是去掉/mogodb后的'/'或者给/data/backup加上'/'

页: [1]
查看完整版本: 虚拟目录下apache点击报The requested URL* was not found on this server.