On Fri, Aug 12, 2011 at 2:30 PM, Paul Walsh <[email protected]> wrote:
> Thanks Graham, I really appreciate the help.
>
> The context:
>
> 512mb VPS on Linode, running Ubuntu 11.04
>
>
> Here are the snippets:
>
>
> A virtual host config from nginx:
>
> server {
> listen ip.adress:80;
> server_name example.com www.example.com;
> access_log /srv/logs/example.com/nginx-access.log;
> error_log /srv/logs/example.com/nginx-error.log error;
>
> location / {
> proxy_pass http://127.0.0.1:8080;
> include /etc/nginx/proxy.conf;
> }
> }
>
>
Shouldn't we be telling nginx something like:
location \.wsgi$ {
include /etc/nginx/proxy.conf;
proxy_pass localhost:8080;
{
?
And couldn't this be just another "location" directive within the default
server directive? In other words I am thinking my one nginx server, and its
replications, can either serve the request for static files or forward the
request to apache, depending on which "location" directive best fits.
server {
> listen ip.address:80;
> root /srv/static/example.com;
> server_name assets.example.com;
> access_log /srv/logs/example.com/nginx-access.log;
> error_log /srv/logs/example.com/nginx-error.log error;
>
> location / {
> expires 30d;
> }
> }
>
>
> Apache virtual host for the same site:
>
> <VirtualHost 127.0.0.1:8080>
> ServerAdmin [email protected]
> ServerName example.com
> ServerAlias www.example.com
> DocumentRoot /srv/src/example.com_venv/apache
>
> ErrorLog /srv/logs/example.com/error.log
> CustomLog /srv/logs/example.com/access.log combined
>
> WSGIScriptAlias / /srv/src/example.com_venv/apache/django.wsgi
> WSGIDaemonProcess site-1 user=my-user group=www-data threads=25
> WSGIProcessGroup site-1
> </VirtualHost>
>
>
> Ok, and in my apache2.conf file
>
> KeepAlive On
> Timeout 300
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
>
>
> And..
>
> # prefork MPM
> # StartServers: number of server processes to start
> # MinSpareServers: minimum number of server processes which are kept spare
> # MaxSpareServers: maximum number of server processes which are kept spare
> # MaxClients: maximum number of server processes allowed to start
> # MaxRequestsPerChild: maximum number of requests a server process serves
> <IfModule mpm_prefork_module>
> StartServers 5
> MinSpareServers 5
> MaxSpareServers 10
> MaxClients 150
> MaxRequestsPerChild 0
> </IfModule>
>
> # worker MPM
> # StartServers: initial number of server processes to start
> # MinSpareThreads: minimum number of worker threads which are kept spare
> # MaxSpareThreads: maximum number of worker threads which are kept spare
> # ThreadLimit: ThreadsPerChild can be changed to this maximum value during
> a
> # graceful restart. ThreadLimit can only be changed by
> stopping
> # and starting Apache.
> # ThreadsPerChild: constant number of worker threads in each server process
> # MaxClients: maximum number of simultaneous client connections
> # MaxRequestsPerChild: maximum number of requests a server process serves
> <IfModule mpm_worker_module>
> StartServers 2
> MinSpareThreads 25
> MaxSpareThreads 75
> ThreadLimit 64
> ThreadsPerChild 25
> MaxClients 150
> MaxRequestsPerChild 0
> </IfModule>
>
>
>
> Then, I couldn't find another way to check enabled mods on ubuntu, except
> actually look at the mods-enabled directory.
>
> There I have:
> authz_user.load
> rpaf.load
> mime.load
> autoindex.load
> setenvif.load
> cgi.load
> negotiation.load
> auth_basic.load
> status.load
> authn_file.load
> deflate.load
> php5.load
> authz_default.load
> wsgi.load
> authz_groupfile.load
> dir.load
> reqtimeout.load
> authz_host.load
> env.load
>
>
> And the associated conf files.
>
> I couldn't work out on Ubuntu how to check if I have prefork MPM or worker
> MPM.
>
> thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/modwsgi/-/qZmXGLJqaOYJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/modwsgi?hl=en.
>
--
*Douglas Epling
President/Owner
YourHelpDesk.us, LLC*
--
You received this message because you are subscribed to the Google Groups
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/modwsgi?hl=en.