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