DSM7 and mod_perl for Apache 2.4

Currently reading
DSM7 and mod_perl for Apache 2.4

6
0
Operating system
  1. Linux
  2. macOS
Mobile operating system
  1. Android
  2. iOS
Last edited:
Hi everyone, has anyone installed mod_perl for Apache 2.4 on DSM7.1. Are there binaries somewhere?
TYIA
 
Last edited:
Have you tried running Perl scripts from WebStation with an Apache backend? I've found it works with '.cgi' file extensions but not '.pl'. Depends on what's defined in httpd.conf or referenced files.

Looking in /usr/local/etc/apache24/conf/httpd24.conf both these are enabled:
Bash:
LoadModule cgid_module modules/mod_cgid.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so

From /usr/local/etc/apache24 I run this command grep -R cgi * | grep .conf (looking for 'conf' files containing 'cgi') and this is the result, exc. the 'denied' access files.
Bash:
grep: conf/extra/httpd-ssl.conf:<FilesMatch "\.(cgi|shtml|phtml|php)$">
conf/extra/httpd-ssl.conf:<Directory "/srv/http/cgi-bin">
conf/httpd24.conf:LoadModule cgid_module modules/mod_cgid.so
conf/httpd24.conf:LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
conf/httpd24.conf:<IfModule cgid_module>
conf/httpd24.conf:    ScriptSock /run/httpd/user-cgisock
conf/httpd24.conf:    AddHandler cgi-script .cgi
sites-enabled/httpd-vhost.conf:        DirectoryIndex  index.html index.htm index.cgi index.php index.php5
sites-enabled/httpd-vhost.conf:        SetHandler "proxy:unix:/run/php-fpm/php-741c1f4b-aeac-47b5-be35-f35112a2d4e7.sock|fcgi://php-741c1f4b-aeac-47b5-be35-f35112a2d4e7"
sites-enabled/httpd-vhost.conf:        DirectoryIndex  index.html index.htm index.cgi index.php index.php5
sites-enabled/httpd-vhost.conf:        SetHandler "proxy:unix:/run/php-fpm/php-741c1f4b-aeac-47b5-be35-f35112a2d4e7.sock|fcgi://php-741c1f4b-aeac-47b5-be35-f35112a2d4e7"
sites-enabled/httpd-vhost.conf:        DirectoryIndex  index.html index.htm index.cgi index.php index.php5
sites-enabled/httpd-vhost.conf:        SetHandler "proxy:unix:/run/php-fpm/php-741c1f4b-aeac-47b5-be35-f35112a2d4e7.sock|fcgi://php-741c1f4b-aeac-47b5-be35-f35112a2d4e7"
sites-enabled/httpd-vhost.conf:        DirectoryIndex  index.html index.htm index.cgi index.php index.php5
sites-enabled/httpd-vhost.conf:        DirectoryIndex  index.html index.htm index.cgi index.php index.php5
sites-enabled/httpd-vhost.conf:        SetHandler "proxy:unix:/run/php-fpm/php-741c1f4b-aeac-47b5-be35-f35112a2d4e7.sock|fcgi://php-741c1f4b-aeac-47b5-be35-f35112a2d4e7"
sites-enabled/httpd-vhost.conf:        DirectoryIndex  index.html index.htm index.cgi index.php index.php5
sites-enabled/httpd-vhost.conf:        DirectoryIndex  index.html index.htm index.cgi index.php index.php5
sites-enabled/httpd-vhost.conf:        SetHandler "proxy:unix:/run/php-fpm/php-e3b9103e-ae6f-4032-ae6d-4543f6d81b44.sock|fcgi://php-e3b9103e-ae6f-4032-ae6d-4543f6d81b44"
sites-enabled/webstation-default.conf:        SetHandler "proxy:unix:/run/php-fpm/php-741c1f4b-aeac-47b5-be35-f35112a2d4e7.sock|fcgi://localhost"
sites-enabled/webstation-default.conf:        DirectoryIndex index.html index.htm index.cgi index.php index.php5

You should be able to work with this and find the best place to install your Perl CGI scripts.
 
Upvote 0
Thanks for your effort - I think this is a good emergency workaround.
However, the Perl control capabilities of the Apache are lost and the performance is much slower using an external interpreter.

It was unfortunately not possible to compile a mod_perl.so from sources because the APXS does not reflect the Perl installation on Synology - hence the question about the binaires.

Anyway - thanks a lot
 
Upvote 0

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

It looks like you have also replaced the case fans - what did you use to replace them?
Replies
20
Views
11,160

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top