0
votes

(Oh, its Jboss not Apache. wow)

I am learning CGI and wish to run a test cgi on Jboss web server as first step lol. I have searched a lot of resources online and tried a lot of ways, but it still be opened as a text file on browser.

More facts: 1 I put script in a directory, and open it on browser e.g. www.xxxx.com/staging/welcome.cgi. Able to open, but shows text not run as script.

2 Script is starting with #!/usr/bin/perl -wT. And I have confirmed my server can run Perl script,path /usr/bin/perl is also correct.

3 I have tried modified httpd.conf according to the tutorials found online

1
Please lol don't lol use lol in lol questions lol when lol you lol really lol aren't lol lolling.Marc B
I am wrong, thanks for pointing out巫妖王

1 Answers

0
votes

It's most probably to do with the fact that the directory your script is placed in doesn't not ExecCGI Option enabled.

Typically done with something like

<Directory /usr/local/apache2/htdocs/somedir>
Options +ExecCGI
</Directory>

http://httpd.apache.org/docs/2.0/howto/cgi.html

By default Apache nominates certain directories you can place CGI scripts in.