1. 程式人生 > >關於 通過http請求 無法訪問Linux下的ftp服務的解決辦法!

關於 通過http請求 無法訪問Linux下的ftp服務的解決辦法!

解決辦法 text alt blog mark ftp mar 分享 代碼

解決辦法:
1.首先進入到NGINX配置文件下面:

技術分享圖片

然後繼續往下:

技術分享圖片

其中 “server_name”表示的是本機IP 也可設置成 “localhost”,“location”表示本地的意思 。

先看根目錄“root /home/ftpuser/hry/”表示的是根路徑,

“images”表示本地路徑。

區別 比如訪問路徑“http://192.168.64.128/home/ftpuser/hry/images”

設置了根路徑之後就可以更改為“http://192.168.64.128/images”

代碼:

server {
listen 80;
server_name 192.168.64.128;
location / {

root html;
index index.html index.htm;
}
location /images/ {
root /home/ftpuser/hry/;
autoindex on;
}

關於 通過http請求 無法訪問Linux下的ftp服務的解決辦法!