Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Perl files wont open, give 404

Discussion in 'General Discussion' started by rudtek, Nov 21, 2017.

  1. rudtek

    rudtek Member

    Joined:
    Jul 19, 2017
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    I have a vps running whm and cpanel.
    • CENTOS 6.9 kvm
    • whm v66.0.23
    • easy apache 4

    No .pl files will run, but instead return an error 404. whether or not they are in the cgi-bin directory. Text files that are in the cgi-bin also give a error 404.

    I have checked permissions. The cgi-bin directory is 0755, and the files inside are 0644.

    In WHM in global appache setup changed "directory "/" options" to inlcude exeCGI, followSymLinks, Inlcudes, IncludesNOEXEC, Indexes, SymLinksIfOwnerMatch

    then restarted apache.

    In my httpd.conf
    I found this line was already there:

    # These extensions are used to redirect incoming requests to WHM
    AddHandler cgi-script .cgi .pl .plx .ppl .perl

    I tried adding this to my .htaccess as well:

    AddHandler cgi-script .cgi .pl
    Options +ExecCGI +IncludesNOEXEC
    XBitHack on

    I found a link that said I needed to change my virtualhost to include this line:

    ScriptAlias /cgi-bin/ "/var/www/vhosts/mysite.com/httpdocs/cgi-bin/"

    but my httpd.conf has this line already:

    <IfModule alias_module>
    ScriptAlias /cgi-bin/ /home/qsginc/public_html/cgi-bin/
    </IfModule>

    which is the right directory.

    I found this link in the forums here:
    Perl files return 404
    but it's not really for easy appache 4

    Can someone please let me know what I missed here?
     
    #1 rudtek, Nov 21, 2017
    Last edited by a moderator: Nov 21, 2017
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Try updating the .pl files to 0755 permissions. Also, browse to "WHM >> Modify an Account" and ensure "CGI Privilege" is enabled for the account in-question.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. rudtek

    rudtek Member

    Joined:
    Jul 19, 2017
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    Thanks for your help! I changed the permissions to 0755 and confirmed CGI privilege. No change in behavior. I still get the error.

    Also, it's a 500 error, not 404. I tried changing my question, but it said I couldn't because it had spam. I don't know why it would say that.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    What output do you see in /usr/local/apache/logs/error_log when you notice the 500 error code?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. rudtek

    rudtek Member

    Joined:
    Jul 19, 2017
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
    [Tue Nov 21 09:18:06.473958 2017] [cgid:error] [pid 14058:tid 140005927765984] (2)No such file or directory: AH01241: exec of '/home/user/public_html/cgi-bin/head.pl' failed
     
    #5 rudtek, Nov 21, 2017
    Last edited by a moderator: Nov 21, 2017
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    What permission and ownership values are configured for the /home/$username/public_html/cgi-bin/ directories and above (up to /home/$username)?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. rudtek

    rudtek Member

    Joined:
    Jul 19, 2017
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oregon
    cPanel Access Level:
    Root Administrator
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,803
    Likes Received:
    1,898
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Feel free to open a support ticket using the link in my signature so we can take a closer look.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice