Issue
One apache httpd virtualhost section for mod_wsgi:
<VirtualHost *:443>
WSGIScriptAlias /pf /home/services/pf/pf.wsgi
WSGIDaemonProcess pf user=wsgi user=operator processes=10 threads=5 display-name=%{GROUP}
WSGIApplicationGroup %{RESOURCE}
WSGIProcessGroup pf
ErrorLog "/home/log/pf-error.log"
TransferLog "/home/log/pf-access.log"
<Directory /home/services/pf>
Require all granted
</Directory>
</VirtualHost>
I want to add another wsgi app 'cf' for '/confirm' URL
and ErrorLog
, TransferLog
for 'cf'.
Like this..
WSGIScriptAlias /cf /home/services/cf/cf.wsgi
WSGIDaemonProcess cf user=wsgi user=operator processes=10 threads=5 display-name=%{GROUP}
WSGIApplicationGroup %{RESOURCE}
WSGIProcessGroup cf
ErrorLog "/home/log/cf-error.log"
TransferLog "/home/log/cf-access.log"
How to make virtualhost section according to URL(/pf, /cf) in same port? Just make new virtualhost section?
Solution
You can only have the one access/error log per VirtualHost. You can't therefore have separate logs based on sub URL under the one site. Creating a separate VirtualHost
will not help as that would have to have a different ServerName
.
If you can give up the log file requirement, you can do:
<VirtualHost *:443>
WSGIScriptAlias /pf /home/services/pf/pf.wsgi
WSGIDaemonProcess pf user=wsgi user=operator processes=10 threads=5 display-name=%{GROUP}
WSGIScriptAlias /cf /home/services/cf/cf.wsgi
WSGIDaemonProcess cf user=wsgi user=operator processes=10 threads=5 display-name=%{GROUP}
WSGIApplicationGroup %{GLOBAL}
<Directory /home/services/pf>
WSGIProcessGroup pf
Require all granted
</Directory>
<Directory /home/services/cf>
WSGIProcessGroup cf
Require all granted
</Directory>
ErrorLog "/home/log/error.log"
TransferLog "/home/log/access.log"
</VirtualHost>
It is better to set WSGIApplicationGroup
to %{GLOBAL}
when you only delegate one WSGI application to each daemon process group.
Answered By - Graham Dumpleton Answer Checked By - Mildred Charles (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.