On Sunday, 9 March 2014 04:46:56 UTC-7, Chris Withers wrote:
>
> What are the things you should consider when deciding between waitress 
> and mod_wsgi when it comes to serving a pyramid app?
>

If you need to run more than one process, or configure SSL, etc. then 
mod_wsgi is the all-in-one solution. This is the config I use (with apache 
2.4 event mpm.):

# The socket directory must be readable by the daemon process user
WSGISocketPrefix /var/run/wsgi
WSGIDaemonProcess myapp user=myapp group=myapp processes=8 threads=1
# No need for embedded interpreters
WSGIRestrictEmbedded On
# Pass the authorization header so basic auth works
WSGIPassAuthorization On

# Specifying process-group and application-group here ensures processes are 
started on httpd start
WSGIScriptAlias / /srv/myapp/parts/production/wsgi process-group=myapp 
application-group=%{GLOBAL}

<Directory /srv/myapp/production>
    Order deny,allow
    Allow from all
    Require all granted
</Directory>

<Directory /srv/myapp/static>
    Order deny,allow
    Allow from all
    Require all granted
</Directory>

# Serve static resources directly from Apache
Alias /static /srv/myapp/static
Alias /favicon.ico /srv/myapp/static/favicon.ico
Alias /robots.txt /srv/myapp/static/robots.txt

# Compress JSON responses.
AddOutputFilterByType DEFLATE application/javascript application/json 
text/css text/html text/javascript


Laurence

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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 http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.

Reply via email to