Jump to content

[Hh#83136] How To Create A Python Web Hosting ?


Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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!")
Guest
This topic is now closed to further replies.
×
×
  • Create New...