You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Laszlo Papp <lp...@kde.org> on 2013/09/19 13:08:21 UTC
[users@httpd] Apache (mod-wsgi) issue
Dear list,
My wsgi file called "cfoo.wsgi" does not seem to load through apache
(mod-wsgi). I see the raw folder content when trying to load the
A.B.C.D/cfoo.wsgi page rather than getting it interpreted through the wsgi
protocol.
This is a Ubuntu 10.04 distribution installed on the server, and almost the
same vhost config file works on another Ubuntu server which is version
12.04. I copied the file from there to this machine with some slight
customization due to the version differences.
You can see my vhost site config and the wsgi files below. I am enabling
the site with /usr/sbin/a2ensite cfoo which runs successfully. Then, I just
reload (although tried restart) apache 2. The mod_wsgi module seems to be
loaded based on the apache2ctl -M output.
==== /var/www/cfoo/cfoo.wsgi ====
import sys
sys.path.insert(0, '/opt/cfoo')
from cfoo import application
==== cat /etc/apache2/sites-available/cfoo ====
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName cfoo.com
# WSGIDaemonProcess cfoo # user=http group=http threads=5
WSGIDaemonProcess cfoo threads=5
WSGIScriptAlias / /var/www/cfoo/cfoo.wsgi
<Directory /var/www/cfoo>
WSGIProcessGroup cfoo
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
CustomLog /var/log/apache2/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
==== The end of the apache error log ====
[Wed Sep 18 18:52:04 2013] [notice] Apache/2.2.14 (Ubuntu)
PHP/5.3.2-1ubuntu4.21 with cfoo mod_wsgi/2.8 Python/2.6.5 mod_perl/2.0.4
Perl/v5.10.1 configured -- resuming normal operations
[Wed Sep 18 18:52:04 2013] [info] mod_wsgi (pid=21945): Attach interpreter
''.
[Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8702): mod_wsgi (pid=21945):
Starting 5 threads in daemon process 'cfoo'.
[Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8708): mod_wsgi (pid=21945):
Starting thread 1 in daemon process 'cfoo'.
[Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8708): mod_wsgi (pid=21945):
Starting thread 2 in daemon process 'cfoo'.
[Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8708): mod_wsgi (pid=21945):
Starting thread 3 in daemon process 'cfoo'.
[Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8708): mod_wsgi (pid=21945):
Starting thread 4 in daemon process 'cfoo'.
[Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8708): mod_wsgi (pid=21945):
Starting thread 5 in daemon process 'cfoo'.
[Wed Sep 18 18:52:04 2013] [info] mod_wsgi (pid=21945): Enable deadlock
thread in process 'cfoo'.
[Wed Sep 18 18:52:04 2013] [info] mod_wsgi (pid=21945): Enable monitor
thread in process 'cfoo'.
[Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8542): mod_wsgi (pid=21945):
Deadlock timeout is 300.
[Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8545): mod_wsgi (pid=21945):
Inactivity timeout is 0.
Thank you in advance,
Laszlo
PS.: This went to the flask mailing list as well, but I do not seem to find
in there for the archive, so I am not sure it actually arrived in there.
Sorry about that anyway.
[users@httpd] Re: Apache (mod-wsgi) issue
Posted by Laszlo Papp <lp...@kde.org>.
Sorry for the noise. I just fixed it by removing the
/etc/apache2/sites-enabled/default manually. I did not know a2ensite would
not be enough for my custom site config. Lesson learned!
On Thu, Sep 19, 2013 at 12:08 PM, Laszlo Papp <lp...@kde.org> wrote:
> Dear list,
>
> My wsgi file called "cfoo.wsgi" does not seem to load through apache
> (mod-wsgi). I see the raw folder content when trying to load the
> A.B.C.D/cfoo.wsgi page rather than getting it interpreted through the wsgi
> protocol.
>
> This is a Ubuntu 10.04 distribution installed on the server, and almost
> the same vhost config file works on another Ubuntu server which is version
> 12.04. I copied the file from there to this machine with some slight
> customization due to the version differences.
>
> You can see my vhost site config and the wsgi files below. I am enabling
> the site with /usr/sbin/a2ensite cfoo which runs successfully. Then, I just
> reload (although tried restart) apache 2. The mod_wsgi module seems to be
> loaded based on the apache2ctl -M output.
>
> ==== /var/www/cfoo/cfoo.wsgi ====
>
> import sys
> sys.path.insert(0, '/opt/cfoo')
>
> from cfoo import application
>
> ==== cat /etc/apache2/sites-available/cfoo ====
>
> <VirtualHost *:80>
>
> ServerAdmin webmaster@localhost
>
> ServerName cfoo.com
>
> # WSGIDaemonProcess cfoo # user=http group=http threads=5
> WSGIDaemonProcess cfoo threads=5
> WSGIScriptAlias / /var/www/cfoo/cfoo.wsgi
>
> <Directory /var/www/cfoo>
>
>
>
> WSGIProcessGroup cfoo
>
> WSGIApplicationGroup %{GLOBAL}
>
>
>
> Order deny,allow
>
>
>
> Allow from all
>
>
>
> </Directory>
>
>
>
>
>
>
>
> DocumentRoot /var/www
>
>
>
> <Directory />
>
>
>
> Options FollowSymLinks
>
>
>
> AllowOverride None
>
>
>
> </Directory>
>
>
>
> <Directory /var/www/>
>
>
>
> Options Indexes FollowSymLinks MultiViews
>
>
>
> AllowOverride None
>
>
>
> Order allow,deny
>
>
>
> Allow from all
>
>
>
> </Directory>
>
>
>
>
>
>
>
> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>
>
>
> <Directory "/usr/lib/cgi-bin">
>
>
>
> AllowOverride None
>
>
>
> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>
>
>
> Order allow,deny
>
>
>
> Allow from all
>
>
>
> </Directory>
>
> ErrorLog /var/log/apache2/error.log
>
> # Possible values include: debug, info, notice, warn, error, crit,
> # alert, emerg.
> LogLevel debug
>
> CustomLog /var/log/apache2/access.log combined
>
> Alias /doc/ "/usr/share/doc/"
> <Directory "/usr/share/doc/">
> Options Indexes MultiViews FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> Allow from 127.0.0.0/255.0.0.0 ::1/128
> </Directory>
>
>
> </VirtualHost>
>
> ==== The end of the apache error log ====
>
> [Wed Sep 18 18:52:04 2013] [notice] Apache/2.2.14 (Ubuntu)
> PHP/5.3.2-1ubuntu4.21 with cfoo mod_wsgi/2.8 Python/2.6.5 mod_perl/2.0.4
> Perl/v5.10.1 configured -- resuming normal operations
> [Wed Sep 18 18:52:04 2013] [info] mod_wsgi (pid=21945): Attach interpreter
> ''.
> [Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8702): mod_wsgi (pid=21945):
> Starting 5 threads in daemon process 'cfoo'.
> [Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8708): mod_wsgi (pid=21945):
> Starting thread 1 in daemon process 'cfoo'.
> [Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8708): mod_wsgi (pid=21945):
> Starting thread 2 in daemon process 'cfoo'.
> [Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8708): mod_wsgi (pid=21945):
> Starting thread 3 in daemon process 'cfoo'.
> [Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8708): mod_wsgi (pid=21945):
> Starting thread 4 in daemon process 'cfoo'.
> [Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8708): mod_wsgi (pid=21945):
> Starting thread 5 in daemon process 'cfoo'.
> [Wed Sep 18 18:52:04 2013] [info] mod_wsgi (pid=21945): Enable deadlock
> thread in process 'cfoo'.
> [Wed Sep 18 18:52:04 2013] [info] mod_wsgi (pid=21945): Enable monitor
> thread in process 'cfoo'.
> [Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8542): mod_wsgi (pid=21945):
> Deadlock timeout is 300.
> [Wed Sep 18 18:52:04 2013] [debug] mod_wsgi.c(8545): mod_wsgi (pid=21945):
> Inactivity timeout is 0.
>
> Thank you in advance,
> Laszlo
>
> PS.: This went to the flask mailing list as well, but I do not seem to
> find in there for the archive, so I am not sure it actually arrived in
> there. Sorry about that anyway.
>