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.

cgi-bin always has 404 error.

Discussion in 'General Discussion' started by DWHS.net, Jun 7, 2005.

  1. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

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

    Thanks,
     
  2. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    You can't call html files from there. They need to be outside of the cgi-bin directory.
     
  3. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    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:
     
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    What are the permissions? I think 777 causes problems. Do you have suexec on or off?
     
  5. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  6. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    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.
     
    #6 DWHS.net, Jun 9, 2005
    Last edited: Jun 9, 2005
  7. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    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?
     
  8. bijo

    bijo Well-Known Member

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

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

    Let me know the status.
     
  9. DWHS.net

    DWHS.net Well-Known Member
    PartnerNOC

    Joined:
    Jul 28, 2002
    Messages:
    1,569
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    LA, Costa RIca
    cPanel Access Level:
    Root Administrator
    Darn it didn't work still no cgi-bin in the apache hosts.
     
    #9 DWHS.net, Jun 9, 2005
    Last edited: Jun 9, 2005
  10. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    I am seeing this behavior on a trustix server now. Not real happy about it.
     
  11. DIYHosting

    DIYHosting Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    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!
     
  12. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    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:
    6
    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...
     
  14. DIYHosting

    DIYHosting Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    60
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Saskatoon, SK, Canada
    Anyone else encountering this?
     
  15. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  16. apogee

    apogee Well-Known Member

    Joined:
    Nov 8, 2004
    Messages:
    107
    Likes Received:
    1
    Trophy Points:
    18
    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:
    1
    Location:
    Upstate New York
    seeing it on 4 RHE3 servers....
     
  18. anup123

    anup123 Well-Known Member

    Joined:
    Mar 29, 2004
    Messages:
    897
    Likes Received:
    1
    Trophy Points:
    18
    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,475
    Likes Received:
    20
    Trophy Points:
    38
    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.
     
  20. kran

    kran Well-Known Member

    Joined:
    Jul 5, 2003
    Messages:
    74
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
Loading...

Share This Page