Python Forum
Getting 'hello word' to work in Web server?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting 'hello word' to work in Web server?
#1
I have a Windows 2016 Server and can't get 'hello world' with Python up and running

The way I've added the code works fine on other servers, yet on this one the result is just 'page not found'

ie. the server is linked to a web page - what do I need to do to enable this on the server side to get it to read the file? thanks

I've tried the Server help at Microsoft and, as usual, they palm me off saying it's a 'coding issue' and gave me a link to this site

So, any ideas thanks?

the problem baasically is that the server won't read the python file, so just display 'page not found'

various adjustments to the shebang line etc. make no difference
Reply
#2
Are you doing CGI, WSGI, Django, Flask?

(Dec-09-2018, 02:37 AM)RedLeonard Wrote: I've tried the Server help at Microsoft and, as usual, they palm me off saying it's a 'coding issue' and gave me a link to this site
Use linux for your server Cool . I dont know windows server, but on linux you have to enable some settings as well as make the file executable. Im sure windows is similar. But there might be some additional things. It also highly depends on which framework you are using.
Recommended Tutorials:
Reply
#3
basically I am intending to use flask, however I can't even get basic 'hello world' running yet

I'm trying to use CGI but looks to me that this is out of date for Windows Server 2016?

so something needs to change, not sure yet what the server uses? I'm stuck with this server for now so changing to Linux is not really the solution
Reply
#4
If your trying to use flask then why are you trying to use CGI?

Have you gone through the installation and quickstart guides?
http://flask.pocoo.org/docs/1.0/
Recommended Tutorials:
Reply
#5
the Flask part isn't the problem here - basically I have that working ok , both on local machine and another server

however, I do in time, want to set it up on my main server, yet for now can't even get past the first hurdle of making any Python work on it, hence questions on forums

looks like I need to delve into the IIS side of things - anyone here good on that ?
Reply
#6
maybe this link will provide some insight? its windows 2012 server but is probably either the same or very similar.
https://medium.com/@bilalbayasut/deployi...1873ae0ad8
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Script does not work on Linux server scrapemasta 0 211 Mar-22-2024, 11:07 AM
Last Post: scrapemasta

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020