404 using cherrypy.tree.mount

John Stile <[email protected]>
Newsgroups gmane.comp.python.cherrypy
Message-ID <[email protected]>
I am using CherryPy-5.3.0, mod_wsgi-4.4.21, and apache-2.4

When I use cherrypy.Application(), I get the expected response.

I want to migrate to using cherrypy.tree.mount(), but I always see 404.

myproject.wsgi (attached) has a function get_app(), where I try to use 
either cherrypy.Application() or cherrypy.tree.mount().

In case it matters, my apache config:
        WSGIScriptAlias  /cherrypy 
/var/www/localhost/wsgi/project_cherrypy/myproject.wsgi
        <Directory "/var/www/localhost/wsgi/project_cherrypy">
            AllowOverride None
        Options None
        Require all granted
        </Directory>

--------------------------------------------
Logs when I use cherrypy.tree.mount():
--------------------------------------------
==> /var/log/apache2/error_log <==
[Mon May 02 21:15:06.429073 2016] [wsgi:info] [pid 18153] [client 
::1:51425] mod_wsgi (pid=18153, process='', 
application='localhost|/cherrypy'): Reloading WSGI script 
'/var/www/localhost/wsgi/project_cherrypy/myproject.wsgi'.

==> /var/log/apache2/access_log <==
::1 - - [02/May/2016:21:15:06 -0700] "GET /cherrypy/joe/ HTTP/1.1" 404 745

==> logs/access.log <==
::1 - - [02/May/2016:21:15:06] "GET /cherrypy/joe/ HTTP/1.1" 404 745 "" 
"Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0"

----------------------------------------------
Logs when I use cherrypy.Application() :
----------------------------------------------
==> /var/log/apache2/error_log <==
[Mon May 02 22:00:50.174465 2016] [wsgi:info] [pid 18154] [client 
::1:51788] mod_wsgi (pid=18154, process='', 
application='localhost|/cherrypy'): Reloading WSGI script 
'/var/www/localhost/wsgi/project_cherrypy/myproject.wsgi'.

==> /var/log/apache2/access_log <==
::1 - - [02/May/2016:22:00:50 -0700] "GET /cherrypy/joe/ HTTP/1.1" 200 9

==> logs/access.log <==
::1 - - [02/May/2016:22:00:50] "GET /cherrypy/joe/ HTTP/1.1" 200 9 "" 
"Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0"

-- 
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.
myproject.wsgi (application/octet-stream, 1.4 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.