Appboard/2.4/admin/enabling cgi: Difference between revisions

imported>Jason.nicholls
No edit summary
imported>Jason.nicholls
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Enabling CGI}}
{{DISPLAYTITLE:Enabling CGI}}
[[Category:AppBoard 2.4]]


The Apache Tomcat server AppBoard runs in can be configured to enable running of CGI scripts.
AppBoard runs on an Apache Tomcat server that can be configured to run CGI scripts. However, enabling CGI can introduce additional load on the AppBoard server and raises it's own security concerns. This document simply covers enabling CGI but thought should go into the issues mentioned.


{{Note|Enabling and writing CGI scripts can introduce additional load on the AppBoard server and security concerns. This document simply covers enabling CGI but thought should go into the issues mentioned.}}
An alternative is to set up a separate web server environment for custom applications and then include the content via enPortal proxy channels.
 
=== Steps to Enable CGI ===
 
# Edit <tt>[INSTALL_HOME]/server/conf/web.xml</tt>
## uncomment the CGI servlet section, lines 333 through 347
## uncomment the CGI servlet-mapping section, lines 381 through 386
## save changes.
# Edit <tt>[INSTALL_HOME]/server/conf/context.xml</tt>
## add the parameter <tt>privileged="true"</tt> to the <tt><Context ... ></tt> tag on line 19.
## save changes.
## create the directory <tt>[INSTALL_HOME]/server/webapps/enportal/WEB-INF/'''cgi'''</tt>
# Restart AppBoard.
 
{{Note|Changes to <tt>web.xml</tt> and <tt>context.xml</tt> are '''not''' archived by default. If changes are made to include these files in archives then they must be manually verified to match the latest version on upgrade. These are considered system files and may change release to release.}}
 
=== Additional Information ===
 
The default CGI options are as follows:
 
* CGI interpreter is the system <tt>perl</tt>. To change this it's necessary to modify the CGI servlet section and set the <tt>executable</tt> parameter.
* CGI files should be placed into <tt>[INSTALL_HOME]/server/webapps/enportal/WEB-INF/cgi/</tt>
* URL to access CGIs: <tt>[http://localhost:8080/enportal/cgi-bin/sample.cgi /enportal/cgi-bin/''sample.cgi'']</tt>
 
For more information on CGI in Tomcat please refer to the [http://tomcat.apache.org/tomcat-7.0-doc/cgi-howto.html Tomcat CGI How To] documentation.

Latest revision as of 06:43, 14 December 2013


AppBoard runs on an Apache Tomcat server that can be configured to run CGI scripts. However, enabling CGI can introduce additional load on the AppBoard server and raises it's own security concerns. This document simply covers enabling CGI but thought should go into the issues mentioned.

An alternative is to set up a separate web server environment for custom applications and then include the content via enPortal proxy channels.

Steps to Enable CGI

  1. Edit [INSTALL_HOME]/server/conf/web.xml
    1. uncomment the CGI servlet section, lines 333 through 347
    2. uncomment the CGI servlet-mapping section, lines 381 through 386
    3. save changes.
  2. Edit [INSTALL_HOME]/server/conf/context.xml
    1. add the parameter privileged="true" to the <Context ... > tag on line 19.
    2. save changes.
    3. create the directory [INSTALL_HOME]/server/webapps/enportal/WEB-INF/cgi
  3. Restart AppBoard.
Template-note.png
Changes to web.xml and context.xml are not archived by default. If changes are made to include these files in archives then they must be manually verified to match the latest version on upgrade. These are considered system files and may change release to release.

Additional Information

The default CGI options are as follows:

  • CGI interpreter is the system perl. To change this it's necessary to modify the CGI servlet section and set the executable parameter.
  • CGI files should be placed into [INSTALL_HOME]/server/webapps/enportal/WEB-INF/cgi/
  • URL to access CGIs: /enportal/cgi-bin/sample.cgi

For more information on CGI in Tomcat please refer to the Tomcat CGI How To documentation.