Answer the question
In order to leave comments, you need to log in
Getting 503 Service Temporarily Unavailable when I try to run mod_wsgi in daemon mode?
Colleagues, I'm not a very big Apache expert and I can not overcome the following problem:
I want to configure mod_wsgi in Daemon mode on the virtual host in order to monitor changes to the Python application source code. When accessing the server, I get an error 503 Service Temporarily Unavailable
In the log:
(13)Permission denied: mod_wsgi (pid=9400): Unable to connect to WSGI daemon process 'blabla.com' on '/var/run/wsgi.5619.0.1 .sock' after multiple attempts.
Here is the virtual machine config:
<VirtualHost *:80><br>
DocumentRoot /home/anti1869/blabla/http<br>
CustomLog /var/log/apache2/anti1869/blabla/access.log combined<br>
ErrorLog /var/log/apache2/anti1869/blabla/error.log<br>
<IfModule peruser.c><br>
ServerEnvironment anti1869 anti1869<br>
Processor anti1869 anti1869<br>
</IfModule><br>
# <IfModule mod_suexec.c><br>
# SuexecUserGroup anti1869 anti1869<br>
# </IfModule><br>
# <IfModule mod_suexec><br>
# SuexecUserGroup anti1869 anti1869<br>
# </IfModule><br>
ServerName blabla.com<br>
ServerAlias www.blabla.com<br>
Alias /.awstats/icon /usr/share/awstats/wwwroot/icon<br><br>
WSGIDaemonProcess blabla.com user=anti1869 group=anti1869 processes=2 threads=15 display-name=%{GROUP}<br>
WSGIProcessGroup blabla.com<br>
</VirtualHost><br>
Answer the question
In order to leave comments, you need to log in
Why don't you have the WSGIScriptAlias directive?
Here is a piece of my working config
WSGIDaemonProcess pb user=django python-path=/home/django/pb
WSGIScriptAlias / /home/django/pb/pb/wsgi.py
WSGIProcessGroup pb
Alias /static/ /home/django/pb/static/
<Directory /home/django/pb/pb>
<Files wsgi.py>
Order deny,allow
Allow from all
</Files>
AuthName NTAuth
AuthType NTLM
NTLMAuth on
NTLMBasicAuth on
NTLMAuthHelper "/usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp"
NTLMBasicAuthoritative on
Require valid-user
Satisfy all
</Directory>
alz, there is no WSGIScriptAlias, because so far my application is mapped like this through .htaccess:
<Files code.py>
SetHandler wsgi-script
Options ExecCGI FollowSymLinks
</Files>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question