-
Notifications
You must be signed in to change notification settings - Fork 1
Notes regarding Apache
hydrogen602 edited this page Mar 29, 2019
·
6 revisions
systemctl restart apache2.service -> restart apache2
/etc/apache2
/var/www/html
/usr/lib/cgi-bin -> moved to /var/www/cgi-bin because of permission errors
AddHandler cgi-script .cgi .py -> Add this to the <Directory /> thing
LoadModule cgid_module modules/mod_cgid.so -> Add this also
Also needs to be added to the config file:
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
#Options All
AllowOverride All
AddHandler cgi-script .cgi .d .py
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
Copy all cgi.\*, cgid.\* from mods-available to mods-enabled
Remeber to do sudo chmod a+rx on the files
A python program reads sensor data and writes it to a json every minute.
dataSheet.html calls dataGetter.js which GET requests the json and places it into the table of dataSheet.html.
dataSheet.html and dataGetter.js should be in /var/www/html.
The python program will be in /var/www/scripts.