lunes, 11 de diciembre de 2017

Python in cpanel with heliohost johnny.heliohost.org

Python in cpanel with heliohost johnny.heliohost.org

1. Create account in heliohost.org

2. Enter in cpanel

3.  This step could be omitted if you wish
Copy .htaccess in folder
     public_html/cgi-bin

.htacces could contain :

Options +ExecCGI
AddHandler cgi-script .py


4. Create file test1.py

#!/usr/bin/python3.6

print("Content-Type: text/html\n\n")

print("Heliohost rules!")

print("How to run Python scripts in cPanel")


5. Change permissions 755

Execute:

http://advanced.heliohost.org/cgi-bin/test1.py




References
https://www.helionet.org/index/topic/29540-total-beginner-need-help-running-a-python-script/

https://www.namecheap.com/support/knowledgebase/article.aspx/9587/29/how-to-run-python-scripts

https://www.helionet.org/index/topic/30495-request-tutorial-to-run-python-script-as-cronjob/

No hay comentarios:

Publicar un comentario