92 lines
2.3 KiB
Plaintext
92 lines
2.3 KiB
Plaintext
##### Kapitel 9 - Dynamische Inhalte
|
|
|
|
### Klassisches CGI
|
|
|
|
<IfModule !mpm_prefork_module>
|
|
LoadModule cgid_module modules/mod_cgid.so
|
|
</IfModule>
|
|
<IfModule mpm_prefork_module>
|
|
LoadModule cgi_module modules/mod_cgi.so
|
|
</IfModule>
|
|
|
|
AddHandler cgi-script .cgi
|
|
|
|
<Directory /usr/local/apache2/htdocs/meine-cgis>
|
|
Options +ExecCGI
|
|
</Directory>
|
|
<Directory /usr/local/apache2/htdocs-*>
|
|
Options +ExecCGI
|
|
</Directory>
|
|
|
|
### 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/
|
|
<Location /perl/>
|
|
SetHandler perl-script
|
|
PerlResponseHandler ModPerl::Registry
|
|
PerlOptions +ParseHeaders
|
|
Options +ExecCGI
|
|
Require all granted
|
|
</Location>
|
|
|
|
AddHandler perl-script .pl
|
|
<Location /meine-cgis/>
|
|
PerlResponseHandler ModPerl::Registry
|
|
PerlOptions +ParseHeaders
|
|
</Location>
|
|
#<Directory /usr/local/apache2/htdocs/>
|
|
# Options +ExecCGI
|
|
#</Directory>
|
|
|
|
<LocationMatch "^/printenv(\.html)?$">
|
|
SetHandler perl-script
|
|
PerlResponseHandler ModPerl::Registry
|
|
PerlOptions +ParseHeaders
|
|
|
|
Options +ExecCGI
|
|
</LocationMatch>
|
|
|
|
### 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.2.24
|
|
|
|
### doc2pdf.sh
|
|
|
|
Action application/msword /cgi-bin/doc2pdf.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"
|
|
|