nginx 作数据仓库时,location 404 Not Found,发现找不到要用的数据报:Not Found

背景:  得到远程机器某个目录下的数据文件io

方案:使用Nginx配置ftp

 

一、/home/ftp/www/ 下面有images 文件夹,为了访问images下面文件,配置Nginx以下:配置

location /images {
root /home/ftp/www/images;
autoindex on;
}im

 

而后报错为:location  404 Not Found,实际上是由于你最终访问的是 /images == root + images = /home/ftp/www/images/images,数据

因此正确的配置是:文件

location /images {
root /home/ftp/www/;
autoindex on;
}远程

 

细节重要哦index

相关文章
相关标签/搜索