HelioHost Posted October 21, 2017 Posted October 21, 2017 Dear sirs: I want to create a Python web hosting (plian CGI without frameworks) with the purpose of evaluation and future buying a commercial plan. I only can host HTML and PHP files, no Python ! How can I do that ? username: inpiton Thank you Hagar Ramon Kirosawa
wolstech Posted October 22, 2017 Posted October 22, 2017 First, we don’t offer any “commercial plan” you can buy. Everything we offer is free. For python, you need to put your files in the cgi-bin folder. The version of python used is determined by the shebang line in your file, and the versions available to you are different depending on which server you pick when you sign up.
Krydos Posted October 22, 2017 Posted October 22, 2017 You can also make python files executable in directories other than cgi-bin, but it requires .htaccess files to do so. Let us know if you're interested and further instructions can be provided.
zecirovi Posted October 24, 2017 Posted October 24, 2017 I tried as well to put simple test .py file inside cgi-bin folder (http://zecirovi.heliohost.org/cgi-bin/test.py) and I got an error. Thanks.
Krydos Posted October 25, 2017 Posted October 25, 2017 The first thing I notice is you don't have a shebang so the server has no idea what language to process your script as. Try something simple like this to begin with: #!/usr/bin/python3.6 print("Content-Type: text/html\n\n") print("Heliohost rules!")
Recommended Posts