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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published 8 hours ago in Confluence

Think you know shares vs. @mentions in Confluence? Take this collab quiz.

To anyone who doubts that Atlassians are a little too obsessed with collaboration, and tools related thereto, let me describe a recent discussion we had (which took place on our internal Confluence, ...

85 views 2 4
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