apache2 出现错误代码 404 的奇怪现象

apache2 出现错误代码 404 的奇怪现象

我发现一件非常非常奇怪的事情发生在我身上!当我需要建立一个 apt 存储库时,我设置了一个 apache2 服务器

我赋予所有文件 777 权限,因此我使用命令:

wget http://10.0.7.180/repo/ncurses-term_6.0+20160213-1ubuntu1_all.deb

并且它可以工作,但是当我下载另一个包时出现 404:

wget http://10.0.7.180/vim_2%3a7.4.1689-3ubuntu1.2_amd64.deb
--2018-12-20 22:23:22--  http://10.0.7.180/vim_2%3a7.4.1689- 
 3ubuntu1.2_amd64.deb
 Connecting to 10.0.7.180:80... connected.
 HTTP request sent, awaiting response... 404 Not Found
 2018-12-20 22:23:22 ERROR 404: Not Found.

第一次,我猜我打错了,所以我又试了一次,虽然我复制粘贴了,但还是出现 404 错误,所以我将它复制到根目录,但你 wget with http://xxx/filename猜怎么着?同样的错误日志再次出现,和之前一模一样。事情完全失控了:

 root@ubuntu:/var/www/html# wget http://10.0.7.180/repo/ssh_1%3a7.2p2-4ubuntu2.6_all.deb
--2018-12-20 22:38:37--  http://10.0.7.180/repo/ssh_1%3a7.2p2-4ubuntu2.6_all.deb
Connecting to 10.0.7.180:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-12-20 22:38:37 ERROR 404: Not Found.

root@ubuntu:/var/www/html# wget http://10.0.7.180/repo/humanity-icon-theme_0.6.10.1_all.deb
--2018-12-20 22:39:01--  http://10.0.7.180/repo/humanity-icon-theme_0.6.10.1_all.deb
Connecting to 10.0.7.180:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1289056 (1.2M) [application/x-debian-package]
Saving to: ‘humanity-icon-theme_0.6.10.1_all.deb’

humanity-icon-theme_0.6.10.1_all.deb             100%[=========================================================================================================>]   1.23M  --.-KB/s    in 0.01s   

2018-12-20 22:39:01 (119 MB/s) - ‘humanity-icon-theme_0.6.10.1_all.deb’ saved [1289056/1289056]

答案1

您用于 wget 的文件名是错误的。%3a计算结果为:

文件名是vim_7.4.1689-3ubuntu1.2_amd64.deb

相关内容