Apache cgi-bin config - Raspberry Pi Forums


hey all,
i've got lamp server , running, relatively easy there many tutorials on web. things become difficult when comes configuring cgi-bin. want use .sh .cgi , .py files. if knows of tutorial please pass along.

understanding 3 things need done working.
  • configure apache2 point cgi-bin , execute file extensions, in case; .sh, .cgi , .py
    change ownership of /var/www/html www-data
    set proper file , folder permissions (chmod)
1) edit apache config file located @

code: select all

/etc/apache2/sites-enabled/000-default.conf
here's mine looks

code: select all

<virtualhost *:80>  scriptalias /cgi-bin/ /usr/lib/cgi-bin/ <directory "/usr/lib/cgi-bin">         addhandler cgi-script .py         addhandler cgi-script .cgi         addhandler cgi-script .sh         allowoverride none         options +execcgi -multiviews +symlinksifownermatch         order allow,deny         allow </directory>          # 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 
gets apache pointing /usr/lib/cgi-bin files don't execute. think because of group files , folders belong to. i've set /var/www/html directory owned www-data. i've added pi user www-data. i've done chmod-ing nothing seems work.

need cgi-bin configured?

thanks
rich

i'm still looking answer this. know how cgi scripts running apache?

thanks
rich


raspberrypi



Comments