GPL V3. Copyleft 2014 to 2022 Forrest Sheng Bao et al.
Assume root directory is /var/www/mflux
.
sudo apt-get install python-dev
sudo python3 -m pip install scikit-learn python-constraint sympy
# need to be installed to system paths- regenerate all models by running
python get_model.py
sudo apt install apache2
sudo a2enmod cgi
Besure that cgi.conf
and cgi.load
are under /etc/apache2/mods-enabled
Add the following content to /etc/apache2/apache2.conf
:
<Directory "/var/www/mflux">
AllowOverride None
Options +ExecCGI
Require all granted
Allow from all
AddHandler cgi-script .py # tell Apache to handle every file with .py suffix as a cgi program
AddHandler default-handler .html .htm # tell Apache to handle HTML files in regular way
</Directory>
Be sure that DocumentRoot
is set under /etc/apache2/sites-enabled
, like
DocumentRoot /var/www/mflux
And restart the web server:
sudo systemctl restart apache2