Results 1 to 3 of 3

Thread: How to enable/disable cgi access?

  1. #1
    Registered Member
    Join Date
    Apr 2004
    Posts
    147

    Angry How to enable/disable cgi access?

    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. #2
    Registered Member
    Join Date
    Jan 2005
    Posts
    1,881

    Default

    Quote Originally Posted by hariskhan
    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>
    What happens when you try to execute a CGI script from within this account's root or public_html directory?

  3. #3
    Registered Member
    Join Date
    Apr 2004
    Posts
    147

    Lightbulb 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

Similar Threads

  1. Replies: 4
    Last Post: 12-11-2013, 10:37 AM
  2. enable and disable compiler access
    By JamieD in forum cPanel Developers
    Replies: 1
    Last Post: 05-16-2011, 10:36 AM
  3. Replies: 1
    Last Post: 08-01-2004, 11:51 AM
  4. How do I enable and disable CGI on an account in WHM?
    By trparky in forum General Discussion
    Replies: 5
    Last Post: 05-03-2004, 08:40 PM
  5. SSH access enable / disable
    By nost in forum General Discussion
    Replies: 1
    Last Post: 10-17-2002, 06:18 AM
bargain