Answer the question
In order to leave comments, you need to log in
How to make php-wrapper for CGI (WSGI) script?
Hello.
There is a folder on the server where the wsgi script is located, and as far as I understand, it starts with Apache and constantly hangs in memory (a feature of WSGI).
I want to place index.php in this folder, so that when it (folder) is accessed, it will first be executed and, say, require authorization, and if it is successful, then index.php would give work to the wsgi script, as if there is no php file.
Is it possible to implement this?
Answer the question
In order to leave comments, you need to log in
The script is registered in vhost.conf and control is given to it automatically.
It is possible to register authorization there. Example:
<VirtualHost *:2000>
ServerName www.server.com
ServerAdmin email
DocumentRoot /var/www/html
ErrorLog logs/server.com-error_log
<Location /var/www/html >
AuthType Basic
AuthName "TAP Surveillance"
AuthUserFile /var/www/s2/.htpasswd-users
Require valid-user
</Location>
</VirtualHost>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question