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

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

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

然後繼續往下:

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

其中 “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;
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章