Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 7 of 7

This is a discussion on cgi-bin 404 in the VPS & Dedicated forum
Hi I have setup a new site on my VPS (WHM / cPanel) with CGI Enabled. I have created test.pl in /public_html/cgi-bin/ When I try ...

  1. #1
    JPC Senior Member
    Join Date
    Nov 2007
    Posts
    55

    cgi-bin 404

    Hi

    I have setup a new site on my VPS (WHM / cPanel) with CGI Enabled.

    I have created test.pl in /public_html/cgi-bin/

    When I try accessing the page I get a 404 (Not found) error. The file is owned by the correct user and is chmod 755.

    Any help would be appreciated.
    Last edited by Matt Smith; 12-02-2008 at 04:15 AM.

  2. #2
    JPC Senior Member
    Join Date
    Nov 2007
    Posts
    55
    I think I can see what is happening, it is looking in /usr/local/apache/cgi-bin instead of the users cgi-bin, surely a new account should automatically be setup to look in the users cgi-bin??

  3. #3
    JPC Dream Team
    Join Date
    Aug 2006
    Posts
    935
    Please open a support ticket and we will check it for you. It normally requires correct path for cgi-bin as ScriptAlias in virtualhost section of your domain.
    Awais | Technical Support
    JaguarPC.com


    Helpful Links
    Current Specials | Knowledge Base | Network Status

  4. #4
    JPC Senior Member
    Join Date
    Nov 2007
    Posts
    55
    JPC-Awais

    Thank you, I have setup a ScriptAlias for the virtualhost and everything now works fine. Was I wrong to assume that this should be done automatically though? It could be very confusing for a user that a cgi-bin gets created but is usless without the ScriptAlias being setup.

  5. #5
    /dev/null JPC-Zishan's Avatar
    Join Date
    Apr 2008
    Posts
    268
    Yes, it should be setup automatically. If its happening for all domains, then I can guess the virtual host template needs to be checked as probably its missing the ScriptAlias line. If it happened just for this domain then it can be a cPanel bug that somehow missed it. In this case cPanel error log can be checked if it logs any such error for that action.
    Zishan - L3 - Shift Lead | JaguarPC

    Helpful Links
    Knowledge Base | Network Status | Current Specials

  6. #6
    JPC Senior Member
    Join Date
    Nov 2007
    Posts
    55
    It is happening for all new domains, where can I find the vhost template?

  7. #7
    /dev/null JPC-Zishan's Avatar
    Join Date
    Apr 2008
    Posts
    268
    You should look for following lines in /var/cpanel/templates/apacheX/vhost.default

    [% IF scriptalias == 1 -%]
    ScriptAlias /cgi-bin/ [% vhost.documentroot %]/cgi-bin/
    [% END -%]
    Zishan - L3 - Shift Lead | JaguarPC

    Helpful Links
    Knowledge Base | Network Status | Current Specials

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •