如何用密码保护Scrapyd UI? [英] How to password protect Scrapyd UI?

查看:259
本文介绍了如何用密码保护Scrapyd UI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的网站可供公众使用,并且Scrapyd在端口6800上运行,例如 http://website.com: 6800/

I have my website available to public and there is Scrapyd running at port 6800 like http://website.com:6800/

我不希望任何人看到我的搜寻器列表.我知道任何人都可以轻易猜出键入6800端口并可以看到最新情况.

I do not want anyone to see list of my crawlers. I know anyone can easily guess type up port 6800 and can see whats going on.

我有几个问题,回答任何一个都会对我有所帮助.

I have few questions, answer any of them will help me.

  1. 是否可以使用密码保护Scrapyd UI?
  2. 我可以使用密码保护Linux上的特定端口吗?我知道可以使用IPTables来只允许特定的IP,但这不是一个好的解决方案
  3. 我应该更改Scrapyd的源代码吗?
  4. 我只能通过.htaccess密码保护特定端口吗?

推荐答案

您应该如果要调用端点的本地主机将其绑定到127.0.0.1和voila,则该地址不适用于外部ips.

If its the localhost which is going to make calls to the endpoints just bind it to 127.0.0.1 and voila, the address doesn't work for external ips.

这篇关于如何用密码保护Scrapyd UI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆