scrapyd修改配置

原文:https://segmentfault.com/a/1190000004970228

因为本人使用anaconda管理python库,所以python的库文件都在anaconda目录下

查找scrapyd的路径

find / -name scrapyd

查到两个结果,

一个是scrapyd的执行程序

一个是scrapyd的库文件

scrapyd修改配置_第1张图片

修改scrapyd的配置,修改成允许远程访问

cd /root/anaconda3/lib/python3.6/site-packages/scrapyd

修改目录下的default_scrapyd.conf的bind_address修改成0.0.0.0允许远程访问

[scrapyd]
eggs_dir    = eggs
logs_dir    = logs
items_dir   =
jobs_to_keep = 5
dbs_dir     = dbs
max_proc    = 0
max_proc_per_cpu = 4
finished_to_keep = 100
poll_interval = 5.0
#bind_address = 127.0.0.1
bind_address = 0.0.0.0
http_port   = 6800
debug       = off
runner      = scrapyd.runner
application = scrapyd.app.application
launcher    = scrapyd.launcher.Launcher
webroot     = scrapyd.website.Root

[services]
schedule.json     = scrapyd.webservice.Schedule
cancel.json       = scrapyd.webservice.Cancel
addversion.json   = scrapyd.webservice.AddVersion
listprojects.json = scrapyd.webservice.ListProjects
listversions.json = scrapyd.webservice.ListVersions
listspiders.json  = scrapyd.webservice.ListSpiders
delproject.json   = scrapyd.webservice.DeleteProject
delversion.json   = scrapyd.webservice.DeleteVersion
listjobs.json     = scrapyd.webservice.ListJobs
daemonstatus.json = scrapyd.webservice.DaemonStatus

 

你可能感兴趣的:(python)