Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8962981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:15:32+00:00 2026-06-15T16:15:32+00:00

I just want to make clear that while in windows, works fine, but when

  • 0

I just want to make clear that while in windows, works fine, but when I try to deploy this script in my VPS it fails.

It is kind of weird because if I add a mapping to the main web application instance which is “mainwebapp” it works, but whenever I add it to any sub application it appears as webpy “Not Found” , I am banging my head against the wall because of this.

In windows I have Wamp 2.2. in my Vps I have CentOS 5, nginx with uWsgi and same Python(2.7) & Webpy Versions from my windows.

I am almost sure that this is a problem with nginx/uwsgi because when I switch to apache/mod_wsgi in my Vps it also works as in my Wamp local server.

So far this is the code I have been testing, it is a very simple one:

class subappcls:
     def GET(self):
          return "This will also be shown fine"


sub_mappings = (
     "/subpath", subappcls
)


#subclass web app
subwebapp = web.application( sub_mappings, globals() )



#mapped clas
class mapped_cls:
def GET(self):
     return "this mapped sub app will not be found"


#Here I add mappings:
subwebapp.add_mapping("/mapped_sub_path", mapped_cls



class appcls:
def GET(self):
     return "main app"



main_mappings = (
     "/subapp", subwebapp,
     "/app", appcls
)

mainwebapp = web.application( main_mappings, fvars=globals() )

class indexcls:
def GET(self):
     return "this will be shown just fine"

mainwebapp.add_mapping("/another",indexcls)


application = mainwebapp.wsgifunc()

When I access:

/subapp/subpath #will work

/subapp/mapped_sub_path #will not work

This will work just fine:

/app

/another

This is the uwsgi log:
* Starting uWSGI 1.3 (64bit) on [Tue Dec 4 18:41:52 2012]
compiled with version: 4.1.2 20080704 (Red Hat 4.1.2-52) on 24 November 2012 02: 21:31
os: Linux-2.6.18-194.17.4.el5xen #1 SMP Mon Oct 25 16:36:31 EDT 2010
WARNING: you are running uWSGI as root !!! (use the –uid flag)
your processes number limit is 32832
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
uwsgi socket 0 bound to UNIX address /tmp/app.sock fd 3
Python version: 2.7.3 (default, Oct 30 2012, 06:37:20) [GCC 4.1.2 20080704 (Red Hat 4.1.2-52)]
Python threads support is disabled. You can enable it with –enable-threads *

EDIT: I enabled threads with the –enable-threads param and did not work either.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:15:33+00:00Added an answer on June 15, 2026 at 4:15 pm

    The problem appears to be with reloader. The following code works if run in integrated dev server (with command python code.py):

    import web
    
    
    web.config.debug = False  # turns off the reloader
    
    
    class subappcls:
        def GET(self):
            return "This will also be shown fine"
    
    sub_mappings = (
        "/subpath", subappcls
    )
    
    #subclass web app
    subwebapp = web.application(sub_mappings, globals())
    
    
    #mapped class
    class mapped_cls:
        def GET(self):
            return "this mapped sub app will not be found"
    
    
    #Here I add mappings:
    subwebapp.add_mapping("/mapped_sub_path", mapped_cls)
    
    
    class appcls:
        def GET(self):
            return "main app"
    
    
    main_mappings = (
        "/subapp", subwebapp,
        "/app", appcls,
    )
    
    mainwebapp = web.application(main_mappings, globals())
    
    
    class indexcls:
        def GET(self):
            return "this will be shown just fine"
    
    mainwebapp.add_mapping("/another", indexcls)
    
    
    if __name__ == "__main__":
        mainwebapp.run()
    else:
        application = mainwebapp.wsgifunc()
    

    Running curl:

    curl http://localhost:8080/subapp/mapped_sub_path
    this mapped sub app will not be found
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just want to make sure one thing. In a windows machine (either a desktop
I just want to set a crontab using that I want to make a
Edit For simplicity: I just want to make the most basic possible cursor that
I can't seem to find an answer on this and just want to make
I just want to know that can i make an application which have some
I want to make a multiplayer game that runs on the Internet, not just
Edit2: I just want to make sure my question is clear: Why, on each
Before I begin I want to make it clear that I don't want the
I know this may seem quite basic to geeks. But I want to make
Hi I just want to make sure I have these concepts right. Overloading in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.