Hello. I'm trying to get working cgi programs with OpenBSD-5.6 stable httpd on default /var/www but without success:
# cat /var/www/logs/httpd-access.log stats.example.com 192.0.2.101 - - [26/Mar/2015:15:30:24 +0300] "GET / HTTP/1.1" 200 376 "" "Mozilla/5.0 (X11; OpenBSD amd64; rv:22.0) Gecko/20100101 Firefox/22.0" stats.example.com 192.0.2.101 - - [26/Mar/2015:15:30:24 +0300] "GET /favicon.ico HTTP/1.1" 404 0 "" "Mozilla/5.0 (X11; OpenBSD amd64; rv:22.0) Gecko/20100101 Firefox/22.0" stats.example.com 192.0.2.101 - - [26/Mar/2015:15:30:24 +0300] "GET /favicon.ico HTTP/1.1" 404 0 "" "Mozilla/5.0 (X11; OpenBSD amd64; rv:22.0) Gecko/20100101 Firefox/22.0" stats.example.com 192.0.2.101 - - [26/Mar/2015:15:30:27 +0300] "GET /cgi-bin/bgplg HTTP/1.1" 500 0 "" "Mozilla/5.0 (X11; OpenBSD amd64; rv:22.0) Gecko/20100101 Firefox/22.0" stats.example.com 192.0.2.101 - - [26/Mar/2015:15:31:22 +0300] "GET / HTTP/1.1" 200 376 "" "Mozilla/5.0 (X11; OpenBSD amd64; rv:22.0) Gecko/20100101 Firefox/22.0" stats.example.com 192.0.2.101 - - [26/Mar/2015:15:31:24 +0300] "GET /cgi-bin/bgplg HTTP/1.1" 500 0 "" "Mozilla/5.0 (X11; OpenBSD amd64; rv:22.0) Gecko/20100101 Firefox/22.0" stats.example.com 192.0.2.101 - - [26/Mar/2015:15:31:26 +0300] "GET /cgi-bin/bgplg HTTP/1.1" 500 0 "" "Mozilla/5.0 (X11; OpenBSD amd64; rv:22.0) Gecko/20100101 Firefox/22.0" Please tell me what I'm doing wrong? My environment: # cat /etc/httpd.conf # # Macros # listen_address="10.0.0.1" # # Global Options # prefork 3 chroot "/var/www" # # Servers # # The HTTPS server server "stats.example.com" { log { \ access "httpd-access.log" \ error "httpd-errors.log" \ style combined \ no syslog \ } listen on $listen_address port 80 location "/cgi-bin/*" { fastcgi root "/" directory { \ no auto index \ no index \ } } location "/*" { root "/htdocs/bgplg" directory { \ no auto index \ index index.html \ } } } # ps -axwwu | egrep "^USER|httpd" | fgrep -v grep USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND www 27370 0.0 0.0 1012 1716 ?? I 3:29PM 0:00.02 httpd: logger (httpd) www 18968 0.0 0.0 884 1620 ?? I 3:29PM 0:00.01 httpd: server (httpd) root 6872 0.0 0.0 1116 1892 ?? Is 3:29PM 0:00.03 httpd: parent (httpd) www 8008 0.0 0.0 884 1632 ?? I 3:29PM 0:00.02 httpd: server (httpd) www 22607 0.0 0.0 984 1832 ?? I 3:29PM 0:00.02 httpd: server (httpd) # cd /var/www # # ls -laR . total 1 drwxr-xr-x 9 root daemon 512 Mar 23 14:08 . drwxr-xr-x 29 root wheel 512 Mar 26 15:26 .. drwxr-xr-x 2 root daemon 512 Aug 8 2014 bin drwx-----T 2 www daemon 512 Aug 8 2014 cache drwxr-xr-x 2 root daemon 512 Aug 8 2014 cgi-bin drwxr-xr-x 2 root daemon 512 Mar 13 18:21 conf drwxr-xr-x 3 root daemon 512 Jan 16 15:27 htdocs drwxr-x--- 2 root www 512 Mar 13 16:29 logs drwxr-xr-x 2 root daemon 512 Aug 8 2014 run ./bin: total 2 drwxr-xr-x 2 root daemon 512 Aug 8 2014 . drwxr-xr-x 9 root daemon 512 Mar 23 14:08 .. ---------- 1 root bin 259280 Aug 8 2014 bgpctl ---------- 1 root bin 210128 Aug 8 2014 ping ---------- 1 root bin 238800 Aug 8 2014 ping6 ---------- 1 root bin 197840 Aug 8 2014 traceroute ---------- 1 root bin 197840 Aug 8 2014 traceroute6 ./cache: total 1 drwx-----T 2 www daemon 512 Aug 8 2014 . drwxr-xr-x 9 root daemon 512 Mar 23 14:08 .. ./cgi-bin: total 1 drwxr-xr-x 2 root daemon 512 Aug 8 2014 . drwxr-xr-x 9 root daemon 512 Mar 23 14:08 .. ---------- 1 root bin 144592 Aug 8 2014 bgplg ./conf: total 1 drwxr-xr-x 2 root daemon 512 Mar 13 18:21 . drwxr-xr-x 9 root daemon 512 Mar 23 14:08 .. -rw-r--r-- 1 root wheel 88 Aug 8 2014 bgplg.css -rw-r--r-- 1 root wheel 13 Aug 8 2014 bgplg.foot -rw-r--r-- 1 root wheel 194 Aug 8 2014 bgplg.head ./htdocs: total 1 drwxr-xr-x 3 root daemon 512 Jan 16 15:27 . drwxr-xr-x 9 root daemon 512 Mar 23 14:08 .. -r--r--r-- 1 root bin 537 Aug 8 2014 50x.html drwxr-xr-x 2 root wheel 512 Jan 16 15:27 bgplg ./htdocs/bgplg: total 1 drwxr-xr-x 2 root wheel 512 Jan 16 15:27 . drwxr-xr-x 3 root daemon 512 Jan 16 15:27 .. -rw-r--r-- 1 root wheel 376 Aug 8 2014 index.html -rw-r--r-- 1 root wheel 75238 Aug 8 2014 openbgpd.gif ./logs: total 1 drwxr-x--- 2 root www 512 Mar 13 16:29 . drwxr-xr-x 9 root daemon 512 Mar 23 14:08 .. -rw-r--r-- 1 root daemon 1178 Mar 26 15:31 httpd-access.log -rw-r--r-- 1 root daemon 0 Mar 13 20:14 httpd-errors.log ./run: total 1 drwxr-xr-x 2 root daemon 512 Aug 8 2014 . drwxr-xr-x 9 root daemon 512 Mar 23 14:08 .. -- Alexei Malinin