wget 文件夹的全部内容从 NGINX 服务器到另一台服务器

问题描述 投票:0回答:1

我在 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/

我一整天都在努力,但并不快乐。

nginx wget
1个回答
0
投票

尝试一下

wget -e robots=off -r http://xxx.xxx.xxx.xxx/scripts/
© www.soinside.com 2019 - 2024. All rights reserved.