Well I remembered my test system I had tried this on and curiosity getting the better of me had to try it. It works as intended once you get it installed and loaded properly luckily I had the other system to copy the loading file from or it would have taken me ages to figure it out..
The whole procedure for anyone wanting to give it a go from my notes on the main machine.
New method for mod_scgi download the code for the module, compile and activate it.
Came after getting the idea from my post telling of the download previous in a reply to it
linking to the website.
https://github.com/nascheme/scgi
Code:
root@bullseye-raspi:~# cat /etc/apache2/mods-available/scgi.load
LoadModule scgi_module /usr/lib/apache2/modules/mod_scgi.so
The file installed from the Debian Buster package for the loading above.
The old package installed from Buster listed.
Code:
root@bullseye-raspi:~/scgi# dpkg -L libapache2-mod-scgi
/.
/etc
/etc/apache2
/etc/apache2/mods-available
/etc/apache2/mods-available/scgi.load
/usr
/usr/lib
/usr/lib/apache2
/usr/lib/apache2/modules
/usr/lib/apache2/modules/mod_scgi.so
/usr/share
/usr/share/doc
/usr/share/doc/libapache2-mod-scgi
/usr/share/doc/libapache2-mod-scgi/changelog.Debian.gz
/usr/share/doc/libapache2-mod-scgi/README.txt
/usr/share/doc/libapache2-mod-scgi/changelog.gz
/usr/share/doc/libapache2-mod-scgi/copyright
root@bullseye-raspi:~/scgi# ll /usr/lib/apache2/modules/mod_scgi.so
-rw-r--r-- 1 root root 18240 Sep 3 2014 /usr/lib/apache2/modules/mod_scgi.so
Remove it.
Code:
root@bullseye-raspi:~/scgi# dpkg -r libapache2-mod-scgi
(Reading database ... 31138 files and directories currently installed.)
Removing libapache2-mod-scgi (1.13-1.1) ...
Module scgi disabled.
apache2_invoke prerm: Disable module scgi
apache2_reload: Your configuration is broken. Not restarting Apache 2
apache2_reload: AH00526: Syntax error on line 48 of /etc/apache2/sites-enabled/000-default.conf:
apache2_reload: Invalid command 'SCGIMount', perhaps misspelled or defined by a module not included in the server configuration
root@bullseye-raspi:~/scgi# ll /usr/lib/apache2/modules/mod_scgi.so
ls: cannot access '/usr/lib/apache2/modules/mod_scgi.so': No such file or directory
Make directory to work in and copy the file needed to compile with Apache module builder.
The source came from.
https://github.com/nascheme/scgi/tree/master/apache2 a simple copy and
paste of it from the mod_scgi.c listed there
Code:
root@bullseye-raspi:~# mkdir scgi
root@bullseye-raspi:~# cd scgi/
root@bullseye-raspi:~/scgi# nano mod_scgi.c
To get the -dev files to compile the module with Apache.
Code:
root@bullseye-raspi:~/scgi# agi apache2-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
autoconf automake autopoint autotools-dev binutils binutils-aarch64-linux-gnu binutils-common
bsdextrautils build-essential cpp cpp-10 debhelper dh-autoreconf dh-strip-nondeterminism
dpkg-dev dwz fakeroot g++ g++-10 gcc gcc-10 gettext gettext-base groff-base intltool-debian
libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libapr1-dev
libaprutil1-dev libarchive-cpio-perl libarchive-zip-perl libasan6 libatomic1 libbinutils
libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libctf-nobfd0 libctf0
libdebhelper-perl libdpkg-perl libexpat1-dev libfakeroot libfile-fcntllock-perl
libfile-stripnondeterminism-perl libgcc-10-dev libgd3 libisl23 libitm1 libldap2-dev liblsan0
libltdl-dev libmail-sendmail-perl libmpc3 libmpfr6 libnsl-dev libpipeline1 libsctp-dev libsctp1
libsigsegv2 libstdc++-10-dev libsub-override-perl libsys-hostname-long-perl libtirpc-dev libtool
libtsan0 libubsan1 libuchardet0 libxpm4 linux-libc-dev m4 make man-db manpages manpages-dev
po-debconf uuid-dev
Suggested packages:
autoconf-archive gnu-standards autoconf-doc binutils-doc cpp-doc gcc-10-locales dh-make
debian-keyring gcc-10-doc gcc-multilib flex bison gdb gcc-doc gettext-doc libasprintf-dev
libgettextpo-dev groff glibc-doc bzr libgd-tools libtool-doc lksctp-tools libstdc++-10-doc
gfortran | fortran95-compiler gcj-jdk m4-doc make-doc www-browser libmail-box-perl
The following NEW packages will be installed:
apache2-dev autoconf automake autopoint autotools-dev binutils binutils-aarch64-linux-gnu
binutils-common bsdextrautils build-essential cpp cpp-10 debhelper dh-autoreconf
dh-strip-nondeterminism dpkg-dev dwz fakeroot g++ g++-10 gcc gcc-10 gettext gettext-base
groff-base intltool-debian libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libapr1-dev libaprutil1-dev libarchive-cpio-perl libarchive-zip-perl
libasan6 libatomic1 libbinutils libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev
libctf-nobfd0 libctf0 libdebhelper-perl libdpkg-perl libexpat1-dev libfakeroot
libfile-fcntllock-perl libfile-stripnondeterminism-perl libgcc-10-dev libgd3 libisl23 libitm1
libldap2-dev liblsan0 libltdl-dev libmail-sendmail-perl libmpc3 libmpfr6 libnsl-dev libpipeline1
libsctp-dev libsctp1 libsigsegv2 libstdc++-10-dev libsub-override-perl libsys-hostname-long-perl
libtirpc-dev libtool libtsan0 libubsan1 libuchardet0 libxpm4 linux-libc-dev m4 make man-db
manpages manpages-dev po-debconf uuid-dev
0 upgraded, 81 newly installed, 0 to remove and 0 not upgraded.
Need to get 69.9 MB of archives.
After this operation, 257 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bullseye/main arm64 bsdextrautils arm64 2.36.1-8 [142 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 libuchardet0 arm64 0.0.7-1 [67.9 kB]
Get:3 http://deb.debian.org/debian bullseye/main arm64 groff-base arm64 1.22.4-6 [883 kB]
...
Setting up apache2-dev (2.4.48-3.1+deb11u1) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for libc-bin (2.31-13) ...
Now build the module.
Code:
root@bullseye-raspi:~/scgi# apxs -i -c mod_scgi.c
/usr/share/apr-1.0/build/libtool --mode=compile --tag=disable-static aarch64-linux-gnu-gcc -prefer-pic -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -c -o mod_scgi.lo mod_scgi.c && touch mod_scgi.slo
libtool: compile: aarch64-linux-gnu-gcc -pipe -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/apache2 -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -I/usr/include -c mod_scgi.c -fPIC -DPIC -o .libs/mod_scgi.o
/usr/share/apr-1.0/build/libtool --mode=link --tag=disable-static aarch64-linux-gnu-gcc -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -o mod_scgi.la -rpath /usr/lib/apache2/modules -module -avoid-version mod_scgi.lo
libtool: link: aarch64-linux-gnu-gcc -shared -fPIC -DPIC .libs/mod_scgi.o -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-soname -Wl,mod_scgi.so -o .libs/mod_scgi.so
libtool: link: ( cd ".libs" && rm -f "mod_scgi.la" && ln -s "../mod_scgi.la" "mod_scgi.la" )
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' mod_scgi.la /usr/lib/apache2/modules
/usr/share/apr-1.0/build/libtool --mode=install install mod_scgi.la /usr/lib/apache2/modules/
libtool: install: install .libs/mod_scgi.so /usr/lib/apache2/modules/mod_scgi.so
libtool: install: install .libs/mod_scgi.lai /usr/lib/apache2/modules/mod_scgi.la
libtool: finish: PATH="/root/bin:/sbin:/home/seeder1/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin" ldconfig -n /usr/lib/apache2/modules
----------------------------------------------------------------------
Libraries have been installed in:
/usr/lib/apache2/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
chmod 644 /usr/lib/apache2/modules/mod_scgi.so
The new module was installed.
Code:
root@bullseye-raspi:~/scgi# ll /usr/lib/apache2/modules/mod_scgi.so
-rw-r--r-- 1 root root 84496 Aug 30 22:53 /usr/lib/apache2/modules/mod_scgi.so
To enable create the scgi.load file.
Code:
root@bullseye-raspi:~# nano /etc/apache2/mods-available/scgi.load
root@bullseye-raspi:~# cat /etc/apache2/mods-available/scgi.load
LoadModule scgi_module /usr/lib/apache2/modules/mod_scgi.so
root@bullseye-raspi:~/scgi# a2enmod scgi
Enabling module scgi.
To activate the new configuration, you need to run:
systemctl restart apache2
root@bullseye-raspi:~/scgi# systemctl restart apache2
The old was uninstalled.
Code:
root@bullseye-raspi:~/scgi# apt-cache policy libapache2-mod-scgi
libapache2-mod-scgi:
Installed: (none)
Candidate: (none)
Version table:
1.13-1.1 -1
100 /var/lib/dpkg/status
It works now to see if it survives a reboot and it did. Oh and the
pip install scgi is useless for the Apache web server.