how to get cgi-sys scripts working.

ka99

New member
Joined
Nov 14, 2025
Messages
13
Hi..

I moved from cpanel recently but facing a problem running the page counter script (Count.cgi), it used to be executed by adding "/cgi-bin/Count.cgi?sh=1&df=m3aq1.dat|display=Counter|ft=6|md=8|frgb=100;139;216|dd=A|Comma=T" in extra.less

I tried editing the domain's httpd.conf and added "ScriptAlias /cgi-sys /usr/local/cpanel/cgi-sys/", but still not working.

I also added "Options +ExecCGI" to .htaccess.. still!

TIA.
 
The httpd.conf file, mine works without any changes. (Running Apache)

With the .htaccess, mine reads;
Code:
Options -Indexes +ExecCGI
AddHandler cgi-script .cgi .pl .py

Have you set correct permissions for the CGI script? Should be 755, not 644.


1764514559204.png



1764514456462.png


1764514413360.png
 
Last edited:
Thanks for the detailed reply DrWizzle..

I followed that, and moved the Count.cgi to /var/www/cgi-bin, but still!!

What's the permission for Count.cgi should be ?

Regards.
 
Working now!!

I check the apache conf and found the cgi-bin was pointing to /home/m3aqnet/domains/domain.name/public_html/cgi-bin/

But then, how about if I want to use the same CGI for another domain, what will be the easiest way other than copying the CGI to each domain's cgi-bin ?!

Thanks for the help
 
Working now!!

I check the apache conf and found the cgi-bin was pointing to /home/m3aqnet/domains/domain.name/public_html/cgi-bin/

But then, how about if I want to use the same CGI for another domain, what will be the easiest way other than copying the CGI to each domain's cgi-bin ?!

Thanks for the help
I would copy the script to the new site's cgi-bin folder to be fair, its quick and doesn't really take up any space. It's probably possible to use one folder for multiple domains (provided they are on same account) but you'd have to create a custom http virtual.conf file (Admin panel, Custom httpd config) but make sure you know what you're doing or you could break your site. Glad you got it sorted in the end 😁
 
I would copy the script to the new site's cgi-bin folder to be fair, its quick and doesn't really take up any space. It's probably possible to use one folder for multiple domains (provided they are on same account) but you'd have to create a custom http virtual.conf file (Admin panel, Custom httpd config) but make sure you know what you're doing or you could break your site. Glad you got it sorted in the end 😁

Right, I think it's better just to copy the script to the other domain's cgi-bin

Thanks for your help DrWizzle.

Regards.
 
Back
Top