httpd cgi (5.6-stable)
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:29PM0:00.02 httpd: logger (httpd) www 18968 0.0 0.0 884 1620 ?? I 3:29PM0:00.01 httpd: server (httpd) root 6872 0.0 0.0 1116 1892 ?? Is 3:29PM0:00.03 httpd: parent (httpd) www 8008 0.0 0.0 884 1632 ?? I 3:29PM0:00.02 httpd: server (httpd) www 22607 0.0 0.0 984 1832 ?? I 3:29PM0: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 wheel88 Aug 8 2014 bgplg.css -rw-r--r-- 1 root wheel13 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 daemon512 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
Re: httpd cgi (5.6-stable) - solved
On 03/26/15 19:55, Carlin Bingham wrote: On Fri, 27 Mar 2015, at 05:41 AM, Alexei Malinin wrote: On 03/26/15 18:33, Carlin Bingham wrote: On Fri, 27 Mar 2015, at 01:50 AM, Alexei Malinin wrote: Hello. I'm trying to get working cgi programs with OpenBSD-5.6 stable httpd on default /var/www but without success: [...] Please tell me what I'm doing wrong? [...] ./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 Check the man page for bgplg(8); you need to set the permissions to make it executable. I set the permissions to 0555 - result was the same as before. Have you started slowcgi(8)? Thank you! Starting slowcgi resolved the problem. PS. Patches for httpd(8) httpd.conf(5): --- httpd.conf.5.orig Wed Jan 28 21:17:23 2015 +++ httpd.conf.5Thu Mar 26 20:09:03 2015 @@ -397,7 +397,8 @@ include /etc/nginx/mime.types .Ed .Sh SEE ALSO -.Xr httpd 8 +.Xr httpd 8 , +.Xr slowcgi 8 .Sh AUTHORS .An -nosplit The --- httpd.8.origWed Jan 28 21:17:23 2015 +++ httpd.8 Thu Mar 26 20:08:52 2015 @@ -81,7 +81,8 @@ Default error log file. .El .Sh SEE ALSO -.Xr httpd.conf 5 +.Xr httpd.conf 5 , +.Xr slowcgi 8 .Sh HISTORY The .Nm -- Alexei
Re: httpd cgi (5.6-stable)
On Fri, 27 Mar 2015, at 05:41 AM, Alexei Malinin wrote: On 03/26/15 18:33, Carlin Bingham wrote: On Fri, 27 Mar 2015, at 01:50 AM, Alexei Malinin wrote: Hello. I'm trying to get working cgi programs with OpenBSD-5.6 stable httpd on default /var/www but without success: [...] Please tell me what I'm doing wrong? [...] ./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 Check the man page for bgplg(8); you need to set the permissions to make it executable. I set the permissions to 0555 - result was the same as before. Have you started slowcgi(8)? -- Carlin
Re: httpd cgi (5.6-stable)
On 03/26/15 18:33, Carlin Bingham wrote: On Fri, 27 Mar 2015, at 01:50 AM, Alexei Malinin wrote: Hello. I'm trying to get working cgi programs with OpenBSD-5.6 stable httpd on default /var/www but without success: [...] Please tell me what I'm doing wrong? [...] ./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 Check the man page for bgplg(8); you need to set the permissions to make it executable. I set the permissions to 0555 - result was the same as before. -- Alexei
Re: httpd cgi (5.6-stable) - solved
On Thu, Mar 26, 2015 at 08:12:27PM +0300, Alexei Malinin wrote: PS. Patches for httpd(8) httpd.conf(5): committed, thanks. jmc --- httpd.conf.5.orig Wed Jan 28 21:17:23 2015 +++ httpd.conf.5Thu Mar 26 20:09:03 2015 @@ -397,7 +397,8 @@ include /etc/nginx/mime.types .Ed .Sh SEE ALSO -.Xr httpd 8 +.Xr httpd 8 , +.Xr slowcgi 8 .Sh AUTHORS .An -nosplit The --- httpd.8.origWed Jan 28 21:17:23 2015 +++ httpd.8 Thu Mar 26 20:08:52 2015 @@ -81,7 +81,8 @@ Default error log file. .El .Sh SEE ALSO -.Xr httpd.conf 5 +.Xr httpd.conf 5 , +.Xr slowcgi 8 .Sh HISTORY The .Nm -- Alexei
Re: httpd cgi (5.6-stable)
On Fri, 27 Mar 2015, at 01:50 AM, Alexei Malinin wrote: Hello. I'm trying to get working cgi programs with OpenBSD-5.6 stable httpd on default /var/www but without success: [...] Please tell me what I'm doing wrong? [...] ./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 Check the man page for bgplg(8); you need to set the permissions to make it executable. -- Carlin [...] -- Alexei Malinin