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-28, 08:41:07

Author Topic: CGI/perl scripts support  (Read 4182 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
CGI/perl scripts support
« on: 2014-07-03, 19:25:01 »
Any plans ? Customers want it and we cannot provide it...

It can be easily made when using nginxproxy+lighttpd !

Lighttpd supports perl scripts out of the box

Example:

PHP script - nginxproxy -> Apache -> php-fpm
perl script - nginxproxy -> Lighttpd
« Last Edit: 2014-07-04, 11:54:46 by Spacedust »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: CGI/perl scripts support
« Reply #1 on: 2014-07-04, 12:43:48 »
Try install mod_perl for apache.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: CGI/perl scripts support
« Reply #2 on: 2014-07-04, 13:13:20 »
Try install mod_perl for apache.

I've installed it but all perl scripts throws Internal Server Error ...

If I run simple Hello world in cgi-bin with permissions 555 then it''s executed properly.

I've also installed: yum -y install perl-devel perl-CPAN perl-Module-Build perl-core perl-libwww-perl
« Last Edit: 2014-07-04, 13:50:35 by Spacedust »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: CGI/perl scripts support
« Reply #3 on: 2014-07-04, 14:30:57 »
1. Don't need mod_perl
2. Permissions of file must be 755
3. Perl file format must be:
Code: [Select]
#!/usr/bin/perl
print "Content-type: text/html\n\n";
...
4. If want perl in all website directory, modified:
Code: [Select]
<Directory "<?php echo $rootpath?>/">
AllowOverride All
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>

to:
Code: [Select]
<Directory "<?php echo $rootpath?>/">
AllowOverride All
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
Options +ExecCGI
AddHandler cgi-script .cgi .pl
</Directory>
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: CGI/perl scripts support
« Reply #4 on: 2014-07-04, 15:31:13 »
1. Don't need mod_perl
2. Permissions of file must be 755
3. Perl file format must be:
Code: [Select]
#!/usr/bin/perl
print "Content-type: text/html\n\n";
...
4. If want perl in all website directory, modified:
Code: [Select]
<Directory "<?php echo $rootpath?>/">
AllowOverride All
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
</Directory>

to:
Code: [Select]
<Directory "<?php echo $rootpath?>/">
AllowOverride All
<IfVersion < 2.4>
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.4>
Require all granted
</IfVersion>
Options +ExecCGI
AddHandler cgi-script .cgi .pl
</Directory>

So I just need to this add this to custom.defaults.tpl.conf and custom.domains.tpl.conf then running /script/fixweb ?

What about python scripts ?
« Last Edit: 2014-07-04, 15:43:33 by Spacedust »

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: CGI/perl scripts support
« Reply #5 on: 2014-07-04, 18:16:19 »
@Spacedust.  It is very easy to use perl to hack kloxoMR without a chroot environment.   I was hoping by now this would be resolved, but still no jailed/chroot for cgi.

With hiawatha / proxy it is VERY simple, yet there is a file that must maintain the linux user names, chroot directories, and it is a pain in the ass to do this manually.  But I have.  Hugo added anything but '!.pl' support to hiawatha reverse proxy, then you let hiawatha's cgi wrapper chroot to a users home directory.

I'm sure we could automate it using kloxomr template, but I am writing the integration for our forums and our vps sales, so I have no time at the moment.

Mustafa could look into this.  It is simple.  VERY SECURE.
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: CGI/perl scripts support
« Reply #6 on: 2014-07-04, 21:08:29 »
How to make read index.cgi ?

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.074 seconds with 19 queries.

web stats analysis