scrapyd 設置訪問密碼


https://cuiqingcai.com/5445.html


 

 

安裝 nginx

 

找到配置文件

find / -name nginx.conf

修改

http {
    server {
        listen 6801;
        location / {
            proxy_pass    http://127.0.0.1:6800/;
            auth_basic    "Restricted";
            auth_basic_user_file    /etc/nginx/conf.d/.htpasswd;
        }
    }
}

 

安裝 htpasswd 

https://www.jianshu.com/p/f4120aa561cc

yum -y  install httpd

生成密碼

在/etc/nginx/conf.d目錄下 

htpasswd -c .htpasswd admin

啟動 nginx

 

 


控制項目

headers={
    'Authorization': 'Basic 填寫你自己的'
}

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM