How to run Perl scripts in cPnginx (Nginx plugin for CPanel)

spiros

  • Administrator
  • Hero Member
  • *****
    • Posts: 824523
    • Gender:Male
  • point d’amour
How to run Perl scripts in cPnginx (Nginx plugin for CPanel)

If you want stand-alone Nginx functionality, clone the Nginx template (Nginx+ PHP-FPM Default Stand Alone), then search for all instances of

Code: [Select]
location ~* ^/(cpanel|webmail|whm|bandwidth|img-sys|java-sys|mailman/archives|pipermail|sys_cpanel|cgi-sys|mailman) {
Replace with
Code: [Select]
location ~* ^/(cpanel|webmail|whm|bandwidth|img-sys|java-sys|cgi-bin|mailman/archives|pipermail|sys_cpanel|cgi-sys|mailman) {
cgi-bin is added as a directory to be parsed by Apache. Now, any scripts in the cgi-bin folder will be parsed by Apache and Perl.

Some useful URLs
https://aruljohn.com/info/nginxcgi/
https://www.nginx.com/modules/perl/
https://www.scalescale.com/tips/nginx/serve-perl-scripts-nginx/
https://metacpan.org/pod/Nginx
http://search.cpan.org/~zzz/Nginx-Perl-1.2.9.7/src/http/modules/perl/Nginx.pm
Module ngx_http_perl_module
nginx and perl
« Last Edit: 17 May, 2018, 10:38:57 by spiros »


 

Search Tools