1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to enable/disable cgi access?

Discussion in 'General Discussion' started by hariskhan, Jul 6, 2006.

  1. hariskhan

    hariskhan Member

    Joined:
    Apr 15, 2004
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    I can manually configure apache to enable/disable cgi bin using;

    <Directory /home/*/public_html/cgi-bin>
    Options +ExecCGI
    </Directory>

    but!

    1) How do I enable/disable cgi scripts to be run through whm/cpanel, if the account already exists?

    I created an account with cgi access enabled and whm/cpanel didn't configure anything in the domain's virtualhost spec that would point to cgi being enabled for this account.

    <VirtualHost 66.232.107.158>
    ServerAlias demo-domain.com
    ServerAdmin webmaster@demo-domain.com
    DocumentRoot /home/demodom/public_html
    BytesLog domlogs/demo-domain.com-bytes_log
    ServerName www.demo-domain.com

    User demodom
    Group demodom
    CustomLog /usr/local/apache/domlogs/demo-domain.com combined
    </VirtualHost>

    2) Where does whm/cpanel enable or disable running of cgi scripts for customer accounts?
     
  2. webignition

    webignition Active Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    What happens when you try to execute a CGI script from within this account's root or public_html directory?
     
  3. hariskhan

    hariskhan Member

    Joined:
    Apr 15, 2004
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Data regarding query....

    The virtualhost spec is as follows;

    ;===============================================================

    <VirtualHost 66.232.107.158>
    ServerAlias demo-domain.com
    ServerAdmin webmaster@demo-domain.com
    DocumentRoot /home/demodom/public_html
    BytesLog domlogs/demo-domain.com-bytes_log
    ServerName www.demo-domain.com

    #
    # My manually created config to allow cgi access to customer
    #
    #
    # Config Block #1
    #
    #
    #<Directory /home/demodom/public_html/cgi-bin>
    # Options +ExecCGI
    #</Directory>
    #
    #
    # Config Block #2
    #
    #<Directory /home/demodom/public_html/cgi-bin/*>
    # Options +ExecCGI
    #</Directory>

    User demodom
    Group demodom
    CustomLog /usr/local/apache/domlogs/demo-domain.com combined
    </VirtualHost>

    ;===============================================================

    When I open up "Config Block #1", cgi scripts under /home/demodom/public_html/cgi-bin run, but cgi scripts under /home/demodom/public_html/cgi-bin/calender/ or in the folders under it don't run. When I open "Config Block #2", I get the following output for the later situation;

    ;===============================================================

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@demo-domain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.


    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


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

    Apache/1.3.34 Server at www.demo-domain.com Port 80
     

Share This Page