|
|
|
|
||||||
| comp.info.servers.unix Web servers for UNIX platforms. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
I have just installed OpenBSD on an old box that comes with Apache version
1.3.29. Running the basic server out of the box is fine. I can't get CGI to work however. I wrote the script recommended on the Apache web page called first.pl. When I try to run this script through the server I get the following errors: >[Tue Feb 22 22:18:42 2005] [error] (2)No such file or directory: exec of /cgi-bin/first.pl failed >[Tue Feb 22 22:18:42 2005] [error] [client 192.168.0.107] Premature end of script headers: /cgi-bin/first.pl The first is the source of the problem meaning that Apache cannot find the perl interpreter for some reason. I know that perl is in /usr/bin/perl (at least this is what `which perl` tells me) and I wrote the script using vi on the BSD box, so the problem is not the trailing \CR. In fact execution of /var/www/cgi-bin/first.pl produces the desired output. I saw some mention in a newsgroup that www should not have a UID or GID below 500, so I changed them to no avail. This is incredibly frustrating to not be able to do the most basic task. Any or advice would be greatly appreciated. I know this question has been posted a million times, so I appologize for asking it again, but I have checked all the standard problems that I can find. Sincerely, TJ Walls |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
> The first is the source of the problem meaning that Apache cannot find the
> perl interpreter for some reason. I know that perl is in /usr/bin/perl > (at least this is what `which perl` tells me) and I wrote the script > using vi on the BSD box, so the problem is not the trailing \CR. > In fact execution of > /var/www/cgi-bin/first.pl produces the desired output. > I found the solution, it is OpenBSD specific and I thought I would post it here for posterity. The OpenBSD install (wisely) chroot(8) jails the Apache webserver. So in /var/www (the ServerRoot, i.e. the jail) I had to create a usr directory and copy all the files found by ldd `which perl`. I got the basic script to run in the way. Thanks, TJ Walls |
|
![]() |
| Outils de la discussion | |
|
|