How to run CGI on Jboss?
(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
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.
精彩评论