S
S
sha2562020-01-25 22:14:52
Apache HTTP Server
sha256, 2020-01-25 22:14:52

What should be the wsgi.conf (Apache) settings to run multiple applications?

Friends, hello everyone!
I'm trying to start the second application on Apache, but only the first VirtualHost works, tell me what I'm doing wrong, wsgi.conf listing:

#Configure mod_wsgi file apache
<VirtualHost *:80>

    ServerName pymain

    WSGIDaemonProcess pybsk processes=1 threads=5 display-name='pybsk-service' restart-interval=86400
    WSGIScriptAlias /Get /var/www/python/main.py
    
    # WSGICallableObject 'application'
    LogLevel info
    DocumentRoot /var/www/python/

    <Directory /var/www/python/>
        WSGIProcessGroup pymain
        WSGIApplicationGroup %{GLOBAL}
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
    </Directory>

    <IfDefine MOD_WSGI_LOAD_PYTHON_DYLIB>
        LoadFile ''
    </IfDefine>
    
    WSGIMapHEADToGET Auto

</VirtualHost>

<VirtualHost *:80>

    ServerName pk

    WSGIDaemonProcess pk processes=1 threads=1 display-name='pk-service' restart-interval=86400
    WSGIScriptAlias /pk /var/www/python/pk/pkmain.py
    
    # WSGICallableObject 'application'
    LogLevel info
    DocumentRoot /var/www/python/pk/

    <Directory /var/www/python/pk/>
        WSGIProcessGroup pk
        WSGIApplicationGroup %{GLOBAL}
        <IfVersion < 2.4>
            Order allow,deny
            Allow from all
        </IfVersion>
        <IfVersion >= 2.4>
            Require all granted
        </IfVersion>
    </Directory>

    <IfDefine MOD_WSGI_LOAD_PYTHON_DYLIB>
        LoadFile ''
    </IfDefine>
    WSGIMapHEADToGET Auto

</VirtualHost>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-01-26
@dimonchik2013

try and log

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question