Apache, Foswiki Error on OpenBSD - Internal Error - Logs say exec of /htdocs/foswiki/bin/configure failed

StackOverflow https://stackoverflow.com/questions/22557226

  •  18-06-2023
  •  | 
  •  

Question

I am using OpenBSD installed with perl, apache, firefox, gedit. I am trying to run foswiki on OpenBSD.

Whenever i try to run

http://127.0.0.1/foswiki/bin/configure

it gives 500 internal server Error. When i checked Logs it revels following information.

[Wed Mar 19 08:24:33 2014] [error] (2)No such file or directory: exec of /htdocs/foswiki/bin/configure failed

[Wed Mar 19 08:24:33 2014] [error] [client 127.0.0.1] Premature end of script headers: /htdocs/foswiki/bin/configure

Can someone guide on what is the issue and how do i resolve. ?

Regards

Location of files: /var/www/htdocs/foswiki

The httpd.conf file has following configuration.

> ServerType standalone

     Timeout 300 
KeepAlive On 
MaxKeepAliveRequests  100 
KeepAliveTimeout 15 
Include /var/www/conf/modules/*.conf

> DocumentRoot "/var/www/htdocs"
> 
> 
> ScriptAlias /foswiki/bin "/var/www/htdocs/foswiki/bin"
> 
> Alias /foswiki "/var/www/htdocs/foswiki" Alias /foswiki/pub
> "/var/www/foswiki/pub"
> 
> <Directory "/var/www/htdocs/foswiki">
>     Order Allow,Deny
>     Allow from all
>     Deny from env=blockAccess </Directory>
> 
> <Directory "/var/www/htdocs">
>     Order Allow,Deny
>     Allow from all
>     Deny from env=blockAccess </Directory>
> 
> 
> <Directory "/var/www/htdocs/foswiki/bin">
>     AllowOverride None
>     Order Allow,Deny
>     Allow from all
>     Deny from env=blockAccess
> 
>     Options ExecCGI FollowSymLinks
>     SetHandler cgi-script
> 
> </Directory>
Était-ce utile?

La solution

Maybe i'm wrong, but in the OpenBsd the apache is chrooted by default, and the foswiki configuration calling external programs. (and of course it want call perl - what is (imho) not allowed with a default OpenBSD apache config).

You can verify this, by copying the cgi-bin/printenv, from the default cgi-bin directory to the foswiki bin set the perm: chmod 755 /var/www/htdocs/foswiki/bin/printenv and point your browser to

http://127.0.0.1/foswiki/bin/printenv

And you should to get the same error.

For testing, if you want run your apache WITHOUT chroot, you can try add to

/etc/rc.conf

the next:

httpd_flags="-u" 

and restart...

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top