hariskhan

Well-Known Member
Apr 15, 2004
146
0
166
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 [email protected]
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?
 

webignition

Well-Known Member
Jan 22, 2005
1,876
2
166
hariskhan said:
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 [email protected]
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?
 

hariskhan

Well-Known Member
Apr 15, 2004
146
0
166
Data regarding query....

The virtualhost spec is as follows;

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

<VirtualHost 66.232.107.158>
ServerAlias demo-domain.com
ServerAdmin [email protected]
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, [email protected] 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