The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How can a user run a .cgi script outside the cgi-bin?

Discussion in 'General Discussion' started by BianchiDude, Feb 23, 2009.

  1. BianchiDude

    BianchiDude Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2005
    Messages:
    619
    Likes Received:
    0
    Trophy Points:
    16
    How can a user run a .cgi script outside the cgi-bin?
     
  2. JPC-Shaun

    JPC-Shaun Well-Known Member

    Joined:
    Oct 29, 2008
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Hi;

    If you wish to run the cgi script outside the cgi-bin folder and it doesn't seem to work, first get in touch with the Technical Support Team of your web host and let them know about your needs.

    Then, ask permission if you're allowed to add the following two lines to your .htaccess file:

    Options +ExecCGI
    AddHandler cgi-script .cgi .pl

    Those two lines tell your webserver to treat files ending in .cgi or .pl to execute (run as scripts). This assumes you've chmoded those files as 755.
     
  3. BianchiDude

    BianchiDude Well-Known Member
    PartnerNOC

    Joined:
    Jul 2, 2005
    Messages:
    619
    Likes Received:
    0
    Trophy Points:
    16
    Thanks, that worked!
     
Loading...

Share This Page