MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: SbkloxoMr on 2019-06-11, 18:49:34
-
Hi all,
I just moved from virtualmin/webmin to Kloxo-MR
I managed to use this great webpanel and add my website online and ready to use.
However, I canno't find the way to execute "test.cgi" in the folder "cgi-bin"
The page will show the source code instead of executing the script...
I'm lost in finding the good config to make it work, please help, many thanks !
***
Using : Lighthttpd + PHP56u+PHP-fpm_event
-
Set chmod for file(s) inside /cgi-bin to 755.
Please inform 'sh /script/sysinfo'.
-
Hi Mustafa,
Yes, CHMOD is set to 755...
SYSINFO
A. Control Panel:
- Kloxo-MR: 7.0.0.c-2019061001
- Web: hiawatha-10.9.0-f.1.mr.el7.x86_64
- PHP: php56s - 5.6.40-1.ius.el7 (fpm mode)
B. Plateform:
- OS: CentOS Linux release 7.6.1810 (Core) x86_64
- Hostname: mail
C. Services:
1. MySQL: MariaDB-server-10.0.38-1.el7.centos.x86_64
2. PHP:
- Installed:
- Branch: php56u-cli-5.6.40-1.ius.el7.x86_64
- Used: --PHP Branch--
- Multiple: disable
3. Web Used: apache
- Hiawatha: hiawatha-10.9.0-f.1.mr.el7.x86_64
- Lighttpd: lighttpd-1.4.53-1.el7.x86_64
- Nginx: nginx-1.17.0-1.el7.ngx.x86_64
- Apache: httpd24u-2.4.39-1.ius.el7.x86_64
- PHP Type: php-fpm_event
- Secondary PHP: on
4. WebCache: none
- ATS: --uninstalled--
- Squid: --uninstalled--
- Varnish: --uninstalled--
5. Dns: bind
- Bind: bind-9.9.9-1.mr.el7.x86_64
- DJBDns: djbdns-1.05-17.4.mr.el7.x86_64
- NSD: nsd-4.1.24-2.el7.x86_64
- PowerDNS: pdns-4.0.3-1.el7.MIND.x86_64
- Yadifa: yadifa-2.3.9-1.el7.x86_64
6. Mail: qmail-toaster-1.03-1.3.57.mr.el7.x86_64
- pop3/imap4: courier-imap-toaster-4.1.2-1.3.20.mr.el7.x86_64
- smtp: qmail-toaster-1.03-1.3.57.mr.el7.x86_64
- spam: bogofilter-1.2.3-6.el7.x86_64
7. FTP: pure-ftpd
- pure-ftpd: pure-ftpd-1.0.47-2.el7.x86_64
8. Stats: awstats
- awstats: kloxomr-stats-awstats-7.6-1.mr.noarch
D. Memory:
total used free shared buff/cache available
Mem: 2048 182 1550 2 315 1727
Swap: 0 0 0
E. Disk Space:
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 50G 2.6G 48G 6% /
*** Process Time: 00:00:00:37.37138 (dd:hh:mm:ss:xxxxxx) ***
* Note: run 'sh /script/sysinfo -y' if you want run 'fix-service-list' also
(importance after Kloxo-MR update)
Any idea ?
-
mod_cgi was disabled by default maybe,
uncomment all line this file
/etc/httpd/conf.modules.d/01-cgi.conf
Avoiding update overwrite this file change the file name ex: 01-cgii.conf
-
Did your file content (above line):
#!/usr/bin/perl
use strict;
use warnings;
print qq(Content-type: text/plain\n\n);
-
I tried so many things that I believe I broke the server lol
So I reinstalled Centos7/Kloxo-MR, added my website, and when I tried to add SSL cert, It was impossible so I changed from lighthttpd to Nginx and SSL cert was created properly.
But I still have troubles with any .cgi file, this is the test file I'm using actually :
#!/usr/bin/perl
##########################################################
# Server Test v2.1 22/August/2003
# © 2003 http://www.EZscripting.co.uk/
##########################################################
# EZscripting.co.uk © 1999 - 2004
# The scripts are available for private and commercial use.
# You can use the scripts in any website you build.
# It is prohibited to sell the scripts in any format to anybody.
# The scripts may only be distributed by EZscripting.co.uk.
# The redistribution of modified versions of the scripts is prohibited.
# EZscripting.co.uk accepts no responsibility or liability
# whatsoever for any damages however caused when using our services or scripts.
# By downloading and using this script you agree to the terms and conditions.
##########################################################
# Upload this script into the directory you are going to use for the script
# CHMOD this 755 or 777 if not public
# Run the script by typing the URL in your browser
# You should now see your PATH and URL information
##########################################################
print "Content-type: text/html\n\n";
print "<html>\n" ;
print "\n" ;
print "<head>\n" ;
print "<title>$ENV{'SERVER_NAME'} EZscripting.co.uk Server Test</title>\n" ;
print "</head>\n" ;
print "\n" ;
print "<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#000000\" vlink=\"#000000\" alink=\"#000000\">\n" ;
print "\n" ;
print "<center><font face=Verdana size=3><b><br>\n" ;
print "EZscripting.co.uk CGI Help Script</b></center>\n" ;
print "<font face=Verdana size=2><b><br><br>\n" ;
print "Path and URL information:</b><br><br>\n" ;
print "Your path to Perl is correct<br>\n" ;
print "Your server is running Perl version: $]<br>\n" ;
print "Your domain name is: $ENV{'SERVER_NAME'}<br>\n" ;
print "The complete system PATH to this script is: $ENV{'SCRIPT_FILENAME'}<br>\n" ;
print "The URL of this script is: http://$ENV{'SERVER_NAME'}$ENV{'SCRIPT_NAME'}<br>\n" ;
print "</body>\n" ;
print "</html>\n" ;
##########################################################
# EZscripting.co.uk © 1999 - 2004
# The scripts are available for private and commercial use.
# You can use the scripts in any website you build.
# It is prohibited to sell the scripts in any format to anybody.
# The scripts may only be distributed by EZscripting.co.uk.
# The redistribution of modified versions of the scripts is prohibited.
# EZscripting.co.uk accepts no responsibility or liability
# whatsoever for any damages however caused when using our services or scripts.
# By downloading and using this script you agree to the terms and conditions.
##########################################################
Any chmod : 755/777 will load the kloxo page with Error 502 instead of the .cgi script.
This time, I will not change anything until you tell me what to do, so please kindly let me know.
-
FYI :)
A. Control Panel:
- Kloxo-MR: 7.0.0.c-2019061001
- Web: hiawatha-10.9.0-f.1.mr.el7.x86_64
- PHP: php56s - 5.6.40-1.ius.el7 (fpm mode)
B. Plateform:
- OS: CentOS Linux release 7.6.1810 (Core) x86_64
- Hostname: mail
C. Services:
1. MySQL: MariaDB-server-10.0.38-1.el7.centos.x86_64
2. PHP:
- Installed:
- Branch: php56u-cli-5.6.40-1.ius.el7.x86_64
- Used: --PHP Branch--
- Multiple: disable
3. Web Used: apache
- Hiawatha: hiawatha-10.9.0-f.1.mr.el7.x86_64
- Lighttpd: lighttpd-1.4.53-1.el7.x86_64
- Nginx: nginx-1.17.0-1.el7.ngx.x86_64
- Apache: httpd24u-2.4.39-1.ius.el7.x86_64
- PHP Type: php-fpm_event
- Secondary PHP: on
4. WebCache: none
- ATS: --uninstalled--
- Squid: --uninstalled--
- Varnish: --uninstalled--
5. Dns: bind
- Bind: bind-9.9.9-1.mr.el7.x86_64
- DJBDns: djbdns-1.05-17.4.mr.el7.x86_64
- NSD: nsd-4.1.24-2.el7.x86_64
- PowerDNS: pdns-4.0.3-1.el7.MIND.x86_64
- Yadifa: yadifa-2.3.9-1.el7.x86_64
6. Mail: qmail-toaster-1.03-1.3.57.mr.el7.x86_64
- pop3/imap4: courier-imap-toaster-4.1.2-1.3.20.mr.el7.x86_64
- smtp: qmail-toaster-1.03-1.3.57.mr.el7.x86_64
- spam: bogofilter-1.2.3-6.el7.x86_64
7. FTP: pure-ftpd
- pure-ftpd: pure-ftpd-1.0.47-2.el7.x86_64
8. Stats: awstats
- awstats: kloxomr-stats-awstats-7.6-1.mr.noarch
D. Memory:
total used free shared buff/cache available
Mem: 2048 214 141 51 1692 1692
Swap: 0 0 0
E. Disk Space:
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 50G 2.6G 48G 6% /
-
No issue when I tested your code in my website.
See http://rpms.armando.id/cgi-bin/test.pl
-
If still error, give me your Kloxo-MR panel and ssh access.
-
No issue when I tested your code in my website.
See http://rpms.armando.id/cgi-bin/test.pl
Hmmm mine domain.com/cgi-bin/test.cgi return :
Error 502 - Bad Gateway
The server either does not recognize the request method, or it lacks the ability to fulfill the request
How comes ?
-
Try rename .cgi to .pl
-
If still error, give me your Kloxo-MR panel and ssh access.
PM sent :)
-
Just running 'sh /script/cleanup'.
-
I tried this, but no chance !
Anyway, problem solved, thanks again !