How I can create a cgi-bin folder in the confluence root??

Hi, I need to create a cgi-bin from transbank's webpay in confluence;

I can't create it...

I use this tutorial and doesn't work ( )

please help.

1 answer

You have to modify 2 files on the server install.

  • The CONF_INSTALL/confluence/WEB-INF/web.xml - to define the cgi servlet and mapping it to a URL
  • The CONF_INSTALL/conf/server.xml - to allow Confluence webapp to use the container servlets & avoid a security violation

In server.xml, modify the context line & add the privileged=true parameter

<Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true" privileged="true">

in web.xml, you need to add two sections, one a servlet definition, the other a servlet mapping.

Add to the start of the servlet mappings

<!-- CGI -->
<!-- CGI -->

and to the start of the servlet-mappings

<!-- CGI -->
<!-- CGI -->

You then create the directory: CONF_INSTALL/confluence/WEB-INF/cgi This is where you store your scripts. By default the servlet will try & invoke perl on the server to run the script. You can change this by reading the configuration on the how to.

One warning.... using a java application container to run cgi scripts is EVIL. Don't do it. It will also open up all sorts of security holes which is you are working for a bank on a payment system is a BAD idea. I think you may want to go & look at how you are solving the problem

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Tuesday in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

238 views 2 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you