zoukankan      html  css  js  c++  java
  • 写一个nginx.conf方便用于下载某个网页的所有资源

    写一个nginx.conf方便用于下载某个网页的所有资源

    worker_processes  1;
    
    events {
        worker_connections  1024;
    }
    
    http {
        include       mime.types;
        default_type  application/octet-stream;
        sendfile        on;
        keepalive_timeout  65;
    
        server{
            listen 8811;
            listen [::]:8811;
            set $proxy_pass_schema "https";
            set $proxy_pass_host "这里改成你要下载网站的域名";
            set $proxy_pass "${proxy_pass_schema}://${proxy_pass_host}";
            resolver 114.114.114.114;
            index _index.html;
            set $rootDir "hosts/${proxy_pass_host}";
            root "${rootDir}";
            proxy_set_header Host $proxy_pass_host;
            proxy_set_header Accept-Encoding "";
            location /{
                set $tmpfile "${rootDir}${uri}";
                proxy_store $tmpfile;
                if (!-e $request_filename) {
                    proxy_pass $proxy_pass;
                }
            }
            location ~ /$ {
                set $tmpfile "${rootDir}${uri}_index.html";
                proxy_store $tmpfile;
                if (!-e $tmpfile) {
                    proxy_pass $proxy_pass;
                }
            }
        }
    
    }
  • 相关阅读:
    [AX]AX2012开发新特性outer join中使用QueryFilter
    [AX]AX2012开发新特性表继承
    docker环境安装
    poj 3469
    poj 1187
    poj 1159
    poj 2135
    poj 1273
    poj 1458
    poj 1141
  • 原文地址:https://www.cnblogs.com/xiangxisheng/p/14071746.html
Copyright © 2011-2022 走看看