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.

map cgi directory

Discussion in 'General Discussion' started by willdeb, Jul 19, 2012.

  1. willdeb

    willdeb Member

    Joined:
    Jul 19, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    How can I map a directory in addition to cgi-bin to run cgi scripts. This was easy when running hsphere but my sites have been recently been moved to a server running cpanel and whm. I have searched all available sources but have been able to find nothing.

    Thanks for your help.
     
  2. mahdy_sharifi

    mahdy_sharifi Well-Known Member

    Joined:
    Feb 26, 2012
    Messages:
    177
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello :
    Do you have root access to server console ? it is possible if you can access it. on shared host not possible.
     
  3. willdeb

    willdeb Member

    Joined:
    Jul 19, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have root access. What is the procedure.

    Thanks for responding.
     
  4. willdeb

    willdeb Member

    Joined:
    Jul 19, 2012
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Bump! Anybody?
     
  5. CitizenK

    CitizenK Well-Known Member

    Joined:
    Jun 5, 2012
    Messages:
    64
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    On The Road
    cPanel Access Level:
    Root Administrator
    Hello,

    On cPanel, by default you can place you cgi,php,etx scripts outside of the cgi-bin directory and they should execute normally.

    • Are you able to execute scripts outside the cgi-bin?
    • If not exactly what error do you receive?
    • Do those same scripts that error outside of the cgi-bin run when inside the cgi-bin?
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Unfortunately, if you wanted to map a new folder, revising /var/cpanel/userdata/username/domain.com for the ScriptAlias section of the cgi-bin doesn't update when running "/scripts/rebuildhttpdconf" command, since it never rebuilds to use that information.

    Also, adding to /usr/local/apache/conf/userdata/std/2/username (where std represent http (rather than https), 2 represents Apache 2 and 2.2, and username represents the cPanel username) will not work as those come after the existing ScriptAlias line and won't be parsed it.

    Adding an include prior to that VirtualHost would map all cgi-bin to that location, so that likewise would not work.

    Thanks!
     
Loading...

Share This Page