Configuring Apache2 for CGI - Raspberry Pi Forums
i'm aware there's lot of tutorials out there on how this, i'm running difficulties however.
i'm following guide: http://brainifacation.blogspot.co.uk/p/webify.html
until have modify 000-default file. contents of mine this:
don't see anywhere add addhandler cgi-script .py.
other issue when create python file, can't seem make executable.
can help?
thanks
i'm following guide: http://brainifacation.blogspot.co.uk/p/webify.html
until have modify 000-default file. contents of mine this:
code: select all
<virtualhost *:80> # servername directive sets request scheme, hostname , port # server uses identify itself. used when creating # redirection urls. in context of virtual hosts, servername # specifies hostname must appear in request's host: header # match virtual host. default virtual host (this file) # value not decisive used last resort host regardless. # however, must set further virtual host explicitly. #servername www.example.com serveradmin webmaster@localhost documentroot /var/www/html # available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # possible configure loglevel particular # modules, e.g. #loglevel info ssl:warn errorlog ${apache_log_dir}/error.log customlog ${apache_log_dir}/access.log combined # configuration files conf-available/, # enabled or disabled @ global level, possible # include line 1 particular virtual host. example # following line enables cgi configuration host # after has been globally disabled "a2disconf". #include conf-available/serve-cgi-bin.conf </virtualhost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
other issue when create python file, can't seem make executable.
can help?
thanks
make sure have link /etc/apache2/conf-available/serve-cgi-bin.conf in /etc/apaqche2/conf-enabled, , there links /etc/apache2/mods-available/cgid.conf , cgid.load in /etc/apache2/mods-enabled.
assuming didn't change defaults, cgi programs belong in /usr/lib/cgi-bin. have cgi programs owned www-data , permissions set 750.
sudo chown www-data:www-data cgi.py
sudo chmod 750 cgi.py
don't have python cgi programs, perl didn't have set handlers, worked , think python programs should too.
assuming didn't change defaults, cgi programs belong in /usr/lib/cgi-bin. have cgi programs owned www-data , permissions set 750.
sudo chown www-data:www-data cgi.py
sudo chmod 750 cgi.py
don't have python cgi programs, perl didn't have set handlers, worked , think python programs should too.
raspberrypi
Comments
Post a Comment