Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-18, 12:35:19

Author Topic: CGI files 404 not found in cgi-bin folder  (Read 8427 times)

0 Members and 1 Guest are viewing this topic.

Offline kloxmox

  • Junior Member
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
CGI files 404 not found in cgi-bin folder
« on: 2015-01-09, 18:31:20 »
Installed Kloxo MR on CentOS 6.6 final 32 bit.
Everything went smooth. I'm using now kloxo for 3 years and it's the first time getting this issue.
For example .htaccess is working in the cgi-bin folder.
Also all html files in root.

Tested with Client and Admin

 Httpd conf:

ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin/">
Options +ExecCGI Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>


Please help.


Thanks

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: CGI files 404 not found in cgi-bin folder
« Reply #1 on: 2015-01-09, 21:09:58 »
Kloxo-MR not use /var/www/cgi-bin as docroot path but /home/<user>/<domain/cgi-bin.

For security reason, every domain only permit to access to /home/<user>.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline kloxmox

  • Junior Member
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: CGI files 404 not found in cgi-bin folder
« Reply #2 on: 2015-01-10, 08:59:14 »
Kloxo-MR not use /var/www/cgi-bin as docroot path but /home/<user>/<domain/cgi-bin.


I had changed the CGI Directory in httod.conf, because I was getting 404 not found with original httpd.conf also.

When I put the cgi file in /home/user/domain I'm just getting the plain text of the file.

Quote
For security reason, every domain only permit to access to /home/<user>.

This means cgi files can't work, because they are in cgi-bin/testcgi.cgi ?

Offline kloxmox

  • Junior Member
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: CGI files 404 not found in cgi-bin folder
« Reply #3 on: 2015-01-10, 09:14:17 »
Just changed in the original kloxo httpd.conf the cgi Dir to  /home/admin/domain/cgi-bin and I'm getting for the CGI files in the cgi-bin folder Internal Server error instead of 404 not found

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: CGI files 404 not found in cgi-bin folder
« Reply #4 on: 2015-01-10, 09:36:40 »
Don't change anything in httpd.conf because Kloxo-MR already support for perl.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: CGI files 404 not found in cgi-bin folder
« Reply #5 on: 2015-01-10, 09:45:23 »
Perl running well in website must:

1. Must be content (in top of file):
Code: [Select]
#!/usr/bin/perl
print "Content-type: text/html\n\n";
2. Permissions of file must be 755 (running 'sh /script/fix-chownchmod' will be fix this issue or change permission in 'file manager')
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline kloxmox

  • Junior Member
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: CGI files 404 not found in cgi-bin folder
« Reply #6 on: 2015-01-10, 09:53:06 »
I've typed sh /script/cleanup for restoring httpd.conf

My cgi Files have the permission 755

#!/usr/bin/perl
print "Content-type: text/html\n\n";
use strict;
use CGI::Carp qw(fatalsToBrowser);
use lib '.';
use Config;
use CGI;
my $ok = "<br><b style='background:#1a1;color:#fff;padding:2px;'>OK</b>";

I've installed Carp, lib and other necenssery modules.

Runned also  sh /script/fix-chownchmod'

still 404 not found...

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: CGI files 404 not found in cgi-bin folder
« Reply #7 on: 2015-01-10, 10:48:47 »
I am just testing with:
Code: [Select]
#!/usr/bin/perl

# hello.pl -- my first perl script!

print "Content-type: text/html\n\n";

print "Hello, world!\n";

and work perfectly.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline kloxmox

  • Junior Member
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: CGI files 404 not found in cgi-bin folder
« Reply #8 on: 2015-01-10, 18:47:35 »
Just pasted this in my cgi file:

#!/usr/bin/perl

# hello.pl -- my first perl script!

print "Content-type: text/html\n\n";

print "Hello, world!\n";

404 not found...

I'm sure it's kloxo issue.
Have you tested it on CentOS 6.6 (final) 32 bit?

Does it work for anyone with the mentioned OS + 32 bit?

It's fresh installed and I didn't have this issue on kloxo official for the last 3 years.
« Last Edit: 2015-01-10, 18:50:03 by kloxmox »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: CGI files 404 not found in cgi-bin folder
« Reply #9 on: 2015-01-10, 22:21:41 »
Inform here your 'sh /script/sysinfo'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline kloxmox

  • Junior Member
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: CGI files 404 not found in cgi-bin folder
« Reply #10 on: 2015-01-10, 22:36:04 »
A. Kloxo-MR: 6.5.0.f-2015010801

B. OS: CentOS release 6.6 (Final) i686

C. Apps:
   1. MySQL: mysql55-5.5.41-2.ius.el6.i686
   2. PHP: php53u-5.3.29-1.ius.el6.i686
   3. Httpd: httpd-2.2.29-1.mr.el6.i386
   4. Lighttpd: --uninstalled--
   5. Nginx: --uninstalled--
   6. Qmail: qmail-toaster-1.03-1.3.45.mr.el6.i386
      - with: courier-imap-toaster-4.1.2-1.3.18.mr.el6.i386
   7. Dns: bind-9.9.5-1.el6.i686

D. Php-type (for Httpd/proxy): mod_php_ruid2

E. Memory:
                total       used       free     shared    buffers     cached
   Mem:          7949       1805       6144          0        109       1361
   -/+ buffers/cache:        335       7614
   Swap:        16383          0      16383

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: CGI files 404 not found in cgi-bin folder
« Reply #11 on: 2015-01-10, 22:48:41 »
Copy '/home/apache/tpl/domains.tpl' to '/home/apache/tpl/custom.domains.tpl' and then change:
Code: [Select]
### MR -- disable perl until fix hardlinks issue
#ScriptAlias /cgi-bin/ "/home/<?php echo $user?>/<?php echo $domainname?>/cgi-bin/"
to:
Code: [Select]
### MR -- disable perl until fix hardlinks issue
ScriptAlias /cgi-bin/ "/home/<?php echo $user?>/<?php echo $domainname?>/cgi-bin/"

and then run 'sh /script/fixweb; sh /script/restart'.

BTW, this issue already fixed in KLoxo-MR 7.0.0 if enable ' Enable CGI' in 'Limit' for each client.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline kloxmox

  • Junior Member
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: CGI files 404 not found in cgi-bin folder
« Reply #12 on: 2015-01-10, 22:58:13 »
Perhaps I should upgrade to v7 better when it's fixed there. Any known bugs or security issues in v7? Or a Link to todo list/bug list?

Is this command for an upgrade right? "yum install kloxomr7; sh /script/cleanup" or this "yum replace kloxomr --replace-with=kloxomr7 -y"

Thanks
« Last Edit: 2015-01-10, 23:01:18 by kloxmox »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: CGI files 404 not found in cgi-bin folder
« Reply #13 on: 2015-01-10, 23:01:40 »
Run 'yum replace kloxomr --replace-with=kloxomr7; sh /script/upcp -y'.

Kloxo-MR 7 may have more bugs (especially for master-slave relation) because still in beta step but better for handle security issues.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline mvillanueva

  • Junior Member
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: CGI files 404 not found in cgi-bin folder
« Reply #14 on: 2015-02-27, 10:38:26 »
Same problem here, but seems not to be .tpl files (at all). Tried to find with mlocate locate.

Where  can I find them?

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo

Page created in 0.043 seconds with 20 queries.

web stats analysis