Thanks Mengu.
1) Yes, WSGIPythonHome is set.
2) No, just one Python version -- 2.6.6 (in a virtualenv)
3) The Apache config is identical between the application that works and
the one that doesn't, except for the obvious things that should vary, such
as the virtual host name, the names of the error log and pid file, the port
number , and so on. See below.
4) I'll try the mod_wsgi group.
---------- conf/define.conf ----------
Define canonical-servername mol301l
Define csmolbio-servername csmolbio-dev
Define zfstockdb-servername zfstockdb-dev
Define ms2-screen-servername ms2-screen-dev
Define server-ip 128.....
Define canonical-docroot /web/www/html-empty
Define csmolbio-docroot /web/www/html
Define zfstockdb-docroot /web/www/html-empty
Define ms2-screen-docroot /web/www/html-empty
Define csmolbio-port 8080
Define zfstockdb-port 8081
Define ms2-screen-port 8082
Define csmolbio-ssl-port 8443
Define zfstockdb-ssl-port 8444
Define ms2-screen-ssl-port 8445
Define loglevel info
Define public "host ..."
Define admin "host ..."
---------- conf/httpd-ms2screen.conf ----------
Include conf/define.conf
# Return only "Apache"
ServerTokens ProductOnly
# Do not return an email address in the headers.
ServerSignature Off
ServerRoot "/usr/local/apache"
PidFile logs/httpd-ms2-screen.pid
Timeout 30
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
Listen *:${ms2-screen-port}
User mbapache
Group mbapache
ServerAdmin webmaster@localhost
ServerName ${ms2-screen-servername}.princeton.edu
UseCanonicalName On
HostnameLookups Off
DocumentRoot ${ms2-screen-docroot}
LogLevel ${loglevel}
LoadModule ssl_module modules/mod_ssl.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule mime_module modules/mod_mime.so
LoadModule headers_module modules/mod_headers.so
LoadModule expires_module modules/mod_expires.so
LoadModule dir_module modules/mod_dir.so
LoadModule php5_module modules/libphp5.so
# Modules specific to this vhost
LoadModule alias_module modules/mod_alias.so
LoadModule wsgi_module modules/mod_wsgi.so
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
# Prevent .htaccess and .htpasswd files from being viewed by Web clients.
<Files ~ "^\.ht">
Require all denied
</Files>
AddDefaultCharset UTF-8
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
openformat
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
%{SSL_PROTOCOL}x %{SSL_CIPHER}x" sslformat
# = = = = = = = = = = Virtual Hosts = = = = = = = = = =
# No access to the canonical server name
<VirtualHost *:${ms2-screen-port}>
ServerName ${canonical-servername}.princeton.edu
DocumentRoot ${canonical-docroot}
ErrorLog logs/canonical-error_log
CustomLog logs/canonical-access_log openformat
</VirtualHost>
WSGISocketPrefix run/wsgi
WSGIPythonHome /web/pythonenv/BASELINE
WSGIPythonPath /web/pythonenv/flynerves/lib/python2.6/site-packages
<VirtualHost *:${ms2-screen-port}>
ServerName ${ms2-screen-servername}.princeton.edu
ErrorLog logs/ms2-screen-error_log
CustomLog logs/ms2-screen-access_log openformat
Alias /images /web/turbogears/flynerves/public/images
Alias /css /web/turbogears/flynerves/public/css
Alias /javascript /web/turbogears/flynerves/public/javascript
WSGIDaemonProcess flynerves threads=10 processes=3
WSGIProcessGroup flynerves
WSGIScriptAlias / /web/turbogears/flynerves/flynerves.wsgi
<Directory /web/turbogears/flynerves>
Options FollowSymLinks
Require all granted
## Require ip 127.0.0.1
</Directory>
</VirtualHost>
# = = = = = = = = = = End Virtual Hosts = = = = = = = = = =
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
# MIME-types for downloading Certificates and CRLs
#
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
#
# The following directives modify normal HTTP response behavior to
# handle known problems with browser implementations.
#
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
#
# The following directive disables redirects on non-GET requests for
# a directory that does not include the trailing slash. This fixes a
# problem with Microsoft WebFolders which does not appropriately handle
# redirects for folders with DAV methods.
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
#
BrowserMatch "Microsoft Data Access Internet Publishing Provider"
redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
Include conf.d/php.conf
On Tue, Mar 19, 2013 at 12:35 PM, Mengu <[email protected]> wrote:
> Hi Matthew,
>
> I can't think of any solutions for this but I have some things to
> tell.
>
> 1) Have you set WSGIPythonHome directive?
>
> 2) Do you have multiple Python versions on your system?
>
> 3) What does your apache conf / virtualhost conf look like?
>
> 4) Can you also ask this question in mod_wsgi group? I don't know if
> Graham checks this group, he usually
>
> On Mar 18, 8:20 pm, MHCPU <[email protected]> wrote:
> > Perhaps someone could suggest where to look for this problem. I have two
> > applications. They are both using TurboGears 2.2.2. They're on the same
> > server, running with Apache and wsgi. There are two Apache instances,
> one
> > for each application, on different ports, with a reverse proxy in front.
> > One application works fine. The other times out and never seems to
> output
> > anything. Eventually this message appears in the Apache error log:
> >
> > [Mon Mar 18 12:25:51.240645 2013] [core:error] [pid 23586:tid
> > 139962542085888] [client 128.112.113.64:50129] End of script output
> before
> > headers: flynerves.wsgi
> >
> > For the problem application, replacing <myapplication>.wsgi with
> test.wsgi
> > works, so the basic WSGI and Apache installation seem fine. The
> > application works with paster, so the application seems fine. But when I
> > configure this application with Apache/WSGI it stops worksing. I put some
> > debug messages (writing to a file, not to stdout) in my RootController's
> > __init__ function, and it seems this function is never called.
> >
> > I have debug set to true in production.ini, and the Apache log level is
> > debug as well. Is there someplace I should look to see what's happening
> > (or rather not happening)? With some more debug messages (to a file) I
> can
> > see that functions in
> PasteDeploy-1.5.0-py2.6.egg/paste/deploy/loadwsgi.py
> > -- loadapp, loadobj, loadcontext, _loadconfig -- are being called. I'm
> not
> > sure where it gets lost after that.
> >
> > Thanks,
> > Matthew
>
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" 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/turbogears?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.