wanboot-cgi error Status: 403 Forbidden (GET method expected)

I am trying to setup wanboot and when I try a client install I get the following error:

boot> go

<time unavailable> wanboot alert: wanbootfs: Request returned code 500

<time unavailable> wanboot alert: Internal Server Error (system_conf file not found)

So I tried to run the script, /var/apache/cgi-bin/wanboot-cgi from the command line I get the following error.

Status: 403 Forbidden (GET method expected)

When I visit the site http://localhost/cgi-bin/wanboot-cgi I get the following error:

Bad Request (missing or illegal CONTENT)

Your browser sent a request that this server could not understand.

Premature end of script headers: /var/apache/cgi-bin/wanboot-cgi

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.36 Server at 127.0.0.1 Port 80

I chmod 755 on the wanboot-cgi per the docs. Any suggestions?

[988 byte] By [bluemustard] at [2007-11-26 11:13:45]
# 1
Have you had any luck with this problem? I'm experiencing the same.RegardsTom
tbeardsell1978 at 2007-7-7 3:28:17 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2

To debug CGI scripts that are expecting a 'GET', you have to set

environment variables which contain the variables & values

anticipated by the CGI.

# export REQUEST_METHOD=GET

# export QUERY_STRING='CONTENT=bootfs&IP=10.23.0.0&CID=01080020F94640&NONCE= 5'

# export DOCUMENT_ROOT=/var/apache2/htdocs

# ./wanboot-cgi | strings | more

Content-Length: 377063

Content-Type: multipart/mixed; boundary=WANBoot_Part_Boundary

--WANBoot_Part_Boundary

Content-Type: application/octet-stream

Content-Length: 376832

CD001

Solaris CDROM

<snip>

I'm stil not sure why wanboot-cgi is failing, though.

apache's errorlog complains about

[Fri Jan 12 13:28:04 2007] [error] [client 10.23.0.11] Premature end of

script headers: wanboot-cgi

Which I'm told is because there's no

200 Ok HTTP/1.0

line in the CGI output above, but I find it hard to believe

that wanboot-cgi can be that badly written. wanboot-cgi

is the same size in all four releases of Solaris 10 available to me.

I'm doing something else wrong, but I don't know what....

kidari at 2007-7-7 3:28:17 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 3
Has anyone found a reason for this?I can get other executables to run from the cgi-bin directory, but not the wanboot-cgiI have been searching for this for a while now.. any help.. thanks..Premature end of script headers: wanboot-cgi
ferreira1975 at 2007-7-7 3:28:18 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 4
HiTry to set local-mac-address to false. This could be the client using a local client ID in the communication with the server. Premature end of script headers: wanboot-cgi
fgd at 2007-7-7 3:28:18 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 5

I was able to get this working, sorry it took so long to respond. The key was the following:

I run Solaris 10 and I upgraded to Apache 2 and it runs as nobody:nobody

1. /etc/netboot needs to be owned by your web server (nobody:nobody in my instance). If the permission on this directory are messed up, it is unable to read your wanboot.conf or your system.conf files.

2. my wanboot-cgi is set at 755 and owned by nobody:nobody

bluemustard at 2007-7-7 3:28:18 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...