Two Django projects running simultaneously and mod_wsgi acting werid

前端 未结 4 886
轻奢々
轻奢々 2020-12-09 12:21

I\'m trying to run two Django projects simultaneously. I happened to be using mod_wsgi, and found the site is acting weird. Perhaps there would be a workaround, but I\'d lik

4条回答
  •  暖寄归人
    2020-12-09 12:32

    Can't comment on the answer given by Graham, so adding one of my own.

    The problem for me really was the Python Interpreter, but I also had to add the python-path for each interpreter. Here follows an example configuration:

    WSGIDaemonProcess py_app1 processes=1 threads=5 python-path=/path/to/app1
    WSGIScriptAlias /app1 /path/to/app1/wsgi.py
    
        
            Order deny,allow
            Allow from all
        
    
    
        WSGIProcessGroup py_app1
        WSGIApplicationGroup %{GLOBAL}
    
    
    WSGIDaemonProcess py_app2 processes=1 threads=5 python-path=/path/to/app2
    WSGIScriptAlias /app2 /path/to/app2/wsgi.py
    
        
            Order deny,allow
            Allow from all
        
    
    
        WSGIProcessGroup py_app2
        WSGIApplicationGroup %{GLOBAL}
    
    

提交回复
热议问题