##### Kapitel 9 - Dynamische Inhalte
### Klassisches CGI
LoadModule cgid_module modules/mod_cgid.so
LoadModule cgi_module modules/mod_cgi.so
AddHandler cgi-script .cgi
Options +ExecCGI
Options +ExecCGI
### PHP8 als Modul
LoadModule php_module modules/libphp.so
AddType application/x-httpd-php .php
### mod_perl
LoadModule perl_module modules/mod_perl.so
Alias /perl/ /usr/local/apache2/perl/
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
Require all granted
AddHandler perl-script .pl
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
### Alte PHP als CGI-Interpreter
LoadModule actions_module modules/mod_actions.so
AddHandler php5-script .php5
Action php5-script /cgi-bin/php-5.6.40
AddHandler php7-script .php7
Action php7-script /cgi-bin/php-7.4.33
AddHandler php8-script .php8
Action php8-script /cgi-bin/php-8.1.42
### doc2pdf.sh
Action application/msword /cgi-bin/doc2pdf2.sh
### docx2pdf.sh
#Action application/msword /cgi-bin/lo2pdf.sh
Action application/vnd.ms-excel /cgi-bin/lo2pdf.sh
Action application/vnd.openxmlformats-officedocument.wordprocessingml.document /cgi-bin/lo2pdf.sh
Action application/vnd.openxmlformats-officedocument.spreadsheetml.sheet /cgi-bin/lo2pdf.sh
Action application/vnd.oasis.opendocument.text /cgi-bin/lo2pdf.sh
Action application/vnd.oasis.opendocument.spreadsheet /cgi-bin/lo2pdf.sh
### PHP-FPM
# In /etc/php/*/fpm/pool.d/www.conf: "security.limit_extensions = .php .phpfpm"
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
# # ProxyPassMatch ^/(.*\.phpfpm)$ fcgi://127.0.0.1:4001/usr/local/apache2/htdocs/$1
#ProxyPassMatch ^/(.*\.phpfpm)$ "unix:/run/php/php8.1-fpm.sock|fcgi://localhost/usr/local/apache2/htdocs/$1"