> On 9 Dec 2016, at 3:15 AM, bherman <[email protected]> wrote:
>
> I created a server using pysimplesoap it implements
> It uses the following code to start.
> log.info("Starting wsgi server...")
> from wsgiref.simple_server import make_server
> application = WSGISOAPHandler(dispatcher)
> wsgid = make_server('', 8008, application)
> wsgid.serve_forever()
> How do I get that working with apache/modwsgi.
> What would be my wsgi file?
> Just the
> from myserver import dispatcher
> from wsgiref.simple_server import make_server
> application = WSGISOAPHandler(dispatcher)
> wsgid = make_server('', 8008, application)
> wsgid.serve_forever()
You do not want to set up wsgid as mod_wsgi provides the WSGI server. So use:
from myserver import dispatcher
from wsgiref.simple_server import make_server
application = WSGISOAPHandler(dispatcher)
if __name__ == '__main__':
wsgid = make_server('', 8008, application)
wsgid.serve_forever()
The check ensures those lines are only run when that script is run from the
command line and not under mod_wsgi.
>
> I am running
> Server version: Apache/2.4.10 (Debian)
> Python Version: 3.4.2
> libapache2-mod-wsgi-py3 version 4.3.0-1
Note that Debian provides a quite old version of mod_wsgi and older than the
minimum recommended version. It is recommended you don’t use the Debian version
and upgrade to the latest from source code.
Graham
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.