Skip to content

Notes regarding Apache

hydrogen602 edited this page Mar 29, 2019 · 6 revisions

Commands

systemctl restart apache2.service -> restart apache2

Remember to do sudo chmod a+rx on the files!

Locations

/etc/apache2
/var/www/html
/usr/lib/cgi-bin -> moved to /var/www/cgi-bin because of permission errors

Config apache2.conf

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>

On mods

Copy all cgi.\*, cgid.\* from mods-available to mods-enabled

Other options

Due to javascript pieces like dataGetter.js, cgi scripts are most likely not going to be used as the js is simpler and more elegant. This makes everything on this page related to them obsolete and means I've wasted many hours trying to get cgis to work on the apache installation. Camera Pi might not even be configured to handle cgi scripts.

Clone this wiki locally