scrapyd 部署
步骤 1
pip install scrapyd
pip install scrapy-client
步骤 2
修改 scrapy.cfg
[deploy:targetName]
url = http://localhost:6800/
project = projectName
步骤 3
scrapyd-deploy targetName -p projectName
scrapyd-deploy -l 会显示项目 则成功
步骤 4
特别注意 默认 是 localhost 访问 如果要ip 访问 最佳实践是 nginx 转发
server {
listen 6801;
location ~ /\.ht { deny all; }
location /
{
proxy_pass http://localhost:6800/;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/conf.d/.htpasswd; 加入用户认证
} }