我在NGINX服务器/ Debian上有一个文件夹:http://xxx.xxx.xxx.xxx/scripts/
我已经为网站添加了NGINX Conf:
server {
listen 80; ## listen for ipv4; this line is default and implied listen [::]:$
listen [::]:80;
root /var/www/default/html;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name **IP of server**;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_read_timeout 3000;
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
allow ::1;
deny all;
}
location /scripts {
autoindex on;
allow xxx.xxx.xxx.xxx;
}
}
然后在另一台服务器上,我想使用wget或类似的方式下载文件夹脚本的全部内容。
wget http://xxx.xxx.xxx.xxx/scripts/
我也试过了:
wget -r --level=0 -E --ignore-length -x -k -p -erobots=off -np -N http://xxx.xxx.xxx.xxx/scripts/
wget -m -nH --cut-dirs=1 -np -R 'index.*' http://xxx.xxx.xxx.xxx/scripts/
然而,我一整天都在努力,而不是快乐。