0

I want to execute a CGI on my server, but I have this issue:

run-detectors: unable to find an interpreter for /media/FTP/outils/cgi-bin/monitorCGI.cgi, >refererer: http://outils.mynd/backburner.
Premature end of scripts header: monitorCGI.cgi, referer: >http://outils.mynd/backburner.

My apache2.conf looks like so:

<location /media/FTP/racine/cgi-bin/>
Options +ExecCGI 
AddHandler cgi-script .cgi 
</Location>

My Vhost looks like so:

>VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName SERV-FTP
    DocumentRoot /media/FTP

    Directory /media/FTP/racine/cgi-bin>
        Options +Indexes FollowSymLinks MultiViews +ExecCGI
        AddHandler cgi-script cgi
        Order allow,deny
        allow from all
    /Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Should I link wine to execute this CGI ?

Hihui
  • 1
  • 4

1 Answers1

0

The Apache webserver is unable to run the monitorCGI.cgi script because it is unable to find an interpreter to use.

This means that it does not recognise monitorCGI.cgi as a compiled binary, and so is treating it as a script, and therefore wants the first line to be #! /path/to/interpreter for some interpreter.

Since you claim the script is a compiled binary, but Apache does not recognise it as such, it is likely compiled for the wrong architecture.

Try the command file monitorCGI.cgi to see what type of file your OS claims it to be. Possibly it is compiled for 64bit when you're running a 32bit system, or it is a Windows executable when you're running a Linux server. In any case, you need to find a compatible binary for it to work. Try running the script directly form the command line, to verify that it can execute, before running via Apache.