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

alias /mogodb/ "/data/backup"
<Directory "/data/backup">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

当我访问 http://host/mogodb/  可以看到当前文件夹的list

但是,我点击其中的选项需要下载的时候,弹出了404

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

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

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加上'/'