python – Launching various web applications on the Apache-ThrowExceptions

Exception or error:

Good afternoon.
There was a task of launching various web applications on the Apache server in Linux.
The first application is GLPI, it works using the PHP module.
The second application – Django / Python (Severcart), works as a separate wsgi process, requests to it are redirected
mod_proxy module. It is already installed and connected by default. It is necessary to organize the division of applications into subdirectories, for example

http://server.local/glpi/

http://server.local/severcart/

Apache configuration file httpd.conf:

<VirtualHost 0.0.0.0:80>
    ServerName  server.local
    ServerAlias *server.local

    CustomLog   /var/log/httpd/access_log combined
    ErrorLog    /var/log/httpd/error_log

    Alias /glpi /var/www/domains/glpi/
    <Directory /var/www/domains/glpi/>
        Require all granted
    </Directory>

    ProxyPass /severcart/static !
    ProxyPass /severcart/media !

    Alias /severcart/static /var/venv/severcart/static
    <Directory /var/venv/severcart/static>
        Require all granted
    </Directory>


    Alias /severcart/media /var/venv/severcart/media
    <Directory /var/venv/severcart/media>
        Require all granted
    </Directory>


    ProxyPreserveHost On
    ProxyPass /severcart http://127.0.0.1:9000/
    ProxyPassReverse /severcart http://127.0.0.1:9000/
</VirtualHost>

When accessing the address http: //server.local/glpi/, everything is fine. When accessing http: //server.local/severcart/, the server throws a 404 error.
I do not consider the option of dividing applications by different domain names. I ask for help in resolving the error.

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *