首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将我的smartThings python3脚本作为cgi文件在apache webserver上工作

如何将我的smartThings python3脚本作为cgi文件在apache webserver上工作
EN

Stack Overflow用户
提问于 2020-05-01 02:48:00
回答 1查看 56关注 0票数 0

我父亲和我正在制作一个few服务器,这样Grafana就可以访问一些python脚本;Grafana只允许您添加到按钮的链接。今天早些时候,我们创建了we服务器。然后我开始处理两个python文件,"smartThingy.py“和"printLight.cgi”。在创建它们之后,我将它们放到网络硬盘上,我爸爸将它们移动到运行apache的centos 8机器上。它的工作后,使文件不以DOS格式。目前,我们正在得到一个小的错误https://pastebin.com/TXhXFPwm。请有人帮助调试代码,这样我们就可以通过转到来打开和关闭灯了吗?

这是我的密码。它只缺少允许它将文本输出到页面上的位。

https://pastebin.com/qn2EMYhZ - smartThingy.py (一个模块,这样可以更容易地创建更多的cgi文件)

https://pastebin.com/9J8HMYS7 - printLight.cgi (控制3d打印机上方的光线)

编辑:我将https://pypi.org/project/pysmartthings/用于smartThings

EN

回答 1

Stack Overflow用户

发布于 2020-05-01 16:55:10

代码语言:javascript
复制
SELinux is preventing /usr/libexec/platform-python3.6 from name_connect access on the tcp_socket port 443.

*****  Plugin catchall_boolean (47.5 confidence) suggests   ******************

If you want to allow httpd to can network connect
Then you must tell SELinux about this by enabling the 'httpd_can_network_connect' boolean.

Do
setsebool -P httpd_can_network_connect 1

SELinux只是对我们很刻薄。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61536055

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档