Jump to content

Recommended Posts

Posted

import web
        
urls = (
    '/(.*)', 'hello'
)
app = web.application(urls, globals())

class hello:        
    def GET(self, name):
        if not name: 
            name = 'World'
        return 'Hello, ' + name + '!'

if __name__ == "__main__":
    app.run()

 

I tried saving this as "test.wsgi" in the cgi-bin directory and it gave a 500 Internal Server Error

The script is working for sure though

Am I getting something wrong?

Posted

it only happens with WSGI scripts beginning with

import web

:/

I tried other *.wsgi scripts and the worked flawlessly

Can there be any other cause giving a 500 error?

 

Does anybody have a working example of a script using web.py??

Posted
now i get a 404 not found... even though I see the file in my cpanel :/

 

Your WSGI file may be returning the 404.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...