Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
Cómo hacer que mi script smartThings python3 funcione en el servidor web apache como un archivo cgi

Mi padre y yo estamos creando un servidor web para que Grafana pueda acceder a algunos scripts de Python; Grafana solo le permite agregar enlaces a los botones. Hoy temprano creamos el servidor web. Luego comencé a trabajar en dos archivos de python, "smartThingy.py" y "printLight.cgi". Después de crearlos, los puse en el disco duro de la red y mi papá los movió a la máquina Centos 8 que ejecutaba Apache. Funcionó después de que los archivos no estuvieran en formato DOS. Actualmente, estamos recibiendo un pequeño error https://pastebin.com/TXhXFPwm . ¿Alguien puede ayudar a depurar el código para que podamos encender y apagar una luz yendo a http://PrivateIpOfTheServer/cgi-bin/printLight.cgi?

Aquí está mi código. Solo le faltan los bits que le permiten generar texto en la página.

https://pastebin.com/qn2EMYhZ - smartThingy.py (un módulo para que sea más fácil crear más archivos cgi)

https://pastebin.com/9J8HMYS7 - printLight.cgi (controla la luz sobre las impresoras 3D)

Editar: estoy usando https://pypi.org/project/pysmartthings/ para smartThings

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

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 solo estaba siendo malo con nosotros.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!