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!

cgi-bin always has 404 error.

Discussion in 'General Discussion' started by WebHostPro, Jun 7, 2005.

  1. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    Anyone know why you would get a 404 error when trying to access any files in the cgi-bin from the url.

    Thanks,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    4
    Trophy Points:
    343
    Location:
    ON, Canada
    You can't call html files from there. They need to be outside of the cgi-bin directory.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    Even cgi files that do not call html get a 404, when I run it ou of the cgi bin it works fine.

    I know some cgi files do not work in the cgi bin but now now are web accessible. This is the correct way I believe but it wasn't in stone before. Now I guess it is :rolleyes:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    4
    Trophy Points:
    343
    Location:
    ON, Canada
    What are the permissions? I think 777 causes problems. Do you have suexec on or off?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    India

    Hello,

    Is it a server wide issue, or problem with only one user?.

    If it is a server wide issue. please hava a look at this link.
    It will help you to solve your problem.

    http://httpd.apache.org/docs-2.0/howto/cgi.html

    Let me know the status.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    It seems to be server wide, cgi runs out of the cgi bin fine but not in and yes suexec is on.


    <VirtualHost 12.123.123.12>
    ServerAlias example.com
    ServerAdmin webmaster@example
    DocumentRoot /home/example/public_html
    BytesLog domlogs/example.com-bytes_log
    ServerName www.example.com

    <IfModule mod_userdir.c>
    Userdir disabled
    Userdir enabled example
    </IfModule>

    <IfModule mod_php4.c>
    php_admin_value open_basedir "/home/example:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>

    User example
    Group example
    CustomLog /usr/local/apache/domlogs/example.com combined
    </VirtualHost>


    ------------

    <IfModule mod_userdir.c>
    Userdir disabled
    Userdir enabled example
    </IfModule>

    What's this thing?

    And any ides to why cpanel took out the cgi line?

    The error log says:

    script not found or unable to stat: /usr/local/apache/cgi-bin/test.cgi

    But the same file works fine out of the cgi bin.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #6 WebHostPro, Jun 9, 2005
    Last edited: Jun 9, 2005
  7. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    It was just the missing cgi-bin line on the host file but how do I get that back for all the domains?

    My god there is about 150 domains on this guy.

    ANy ideas and how to get the cgi-bin line for each domain back in there?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    India
    Hello,

    First take the backup and run this command.
    ----------------------------------
    /scripts/rebuildhttpdconf
    ----------------------------------

    Let me know the status.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. WebHostPro

    WebHostPro Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,654
    Likes Received:
    15
    Trophy Points:
    318
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Twitter:
    Darn it didn't work still no cgi-bin in the apache hosts.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #9 WebHostPro, Jun 9, 2005
    Last edited: Jun 9, 2005
  10. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    902
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    I am seeing this behavior on a trustix server now. Not real happy about it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. DIYHosting

    DIYHosting Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Saskatoon, SK, Canada
    I just noticed that this is happening on my RHEL3 servers. The ScriptAlias /cgi-bin/ /home/username/public_html/cgi-bin/ line isn't being added for newly created accounts.

    Weak!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    890
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    This Planet
    A shot in the dark.
    Just check:

    WHM>>Edit Setup --- scroll down to CGI Script Alias
    see if you have a y there and not a n

    Anup
     
  13. DIYHosting

    DIYHosting Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Saskatoon, SK, Canada
    Yes I have a y in the WHM setup of the CGI ScriptAlias.

    It has always worked in the past so this looks to be a bug that has come into play in one of the newer builds...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. DIYHosting

    DIYHosting Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Saskatoon, SK, Canada
    Anyone else encountering this?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    902
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    We saw this briefly on a centos 4.0 box but it seems to have gone away.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. apogee

    apogee Well-Known Member

    Joined:
    Nov 8, 2004
    Messages:
    107
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Europe
    cPanel Access Level:
    DataCenter Provider
    same here...
     
  17. manlius.com

    manlius.com Active Member

    Joined:
    Nov 20, 2002
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    151
    Location:
    Upstate New York
    seeing it on 4 RHE3 servers....
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    890
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    This Planet
    Confirming this on RH9/CURRENT Tree
    Was not happening earlier
    Every domain addition, i have to add the ScriptAlias by hand and restart httpd

    Any news?

    Anup
     
  19. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    This was definitely fixed in EDGE some time ago, don't know if it would be in the latest CURRENT yet - check the changelog.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  20. kran

    kran Well-Known Member

    Joined:
    Jul 5, 2003
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Colombia
    cPanel Access Level:
    Root Administrator
    I fixed for some customers

    Some of my customers were getting 404 errors in the formmail script...

    I ran the Option in WHM

    WHM-->Software----Check repair a perl Script ---> /home/user/public_html/cgi-bin/formmail.pl

    After that If was fixed.
     
    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