##### Kapitel 12 LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so LoadModule proxy_http_module modules/mod_proxy_http.so ### Forward-Proxy ProxyVia full Listen 127.0.0.1:3128 Require ip 127.0.0.0/8 ProxyRequests On CustomLog logs/proxy_access.log combined ErrorLog logs/proxy_error.log ### Forward-Proxy mit Caching #LoadModule proxy_module modules/mod_proxy.so #LoadModule proxy_connect_module modules/mod_proxy_connect.so #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so #LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule cache_module modules/mod_cache.so #2.2#LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule cache_disk_module modules/mod_cache_disk.so Listen 127.0.0.1:3142 Require ip 127.0.0.0/8 ProxyRequests On CacheEnable disk http://* CacheRoot /usr/local/apache2/proxy-cache/ CacheDirLevels 2 CacheDirLength 2 # CacheMinFileSize 1 # CacheMaxFileSize 10000000 # # CacheDefaultExpire 3600 # CacheMinExpire 600 # CacheMaxExpire 86400 # # CacheLastModifiedFactor 0.1 # CacheIgnoreNoLastMod On # # CacheStoreNoStore On # CacheStorePrivate On # CustomLog logs/caching_access.log combined LogLevel debug ErrorLog logs/caching_error.log ### Reverse-Proxy für Heise-Newsticker ServerName revproxy.sv ProxyPass /newsticker/ https://www.heise.de/newsticker/ ProxyPassReverse /newsticker/ https://www.heise.de/newsticker/ ProxyPassReverse /newsticker/ https://193.99.144.85/newsticker/ ProxyPassReverse /newsticker/ https://193.99.144.80/newsticker/ SSLProxyEngine On CustomLog logs/revproxy_access.log combined ErrorLog logs/revproxy_error.log ### Reverse-Proxy für PHP-FPM #LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so ServerName revproxy-php.sv SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost" ProxyPassMatch "^/(.*\.php0(/.*)?)$" "fcgi://127.0.0.1:4001/usr/local/apache2/htdocs/$1" CustomLog logs/revproxy-php_access.log combined ErrorLog logs/revproxy-php_error.log ### Reverse-Proxy für Tomcat #LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_ajp_module modules/mod_proxy_ajp.so LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.so ServerName tomcat.sv DocumentRoot /usr/share/tomcat10-examples/ RewriteEngine On RewriteRule ^/examples/(.*)\.jsp(x?)$ ajp://localhost:8009/examples/$1.jsp$2 [P,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-d RewriteRule ^/examples/websocket/(.*)$ ws://localhost:8080/examples/websocket/$1 [P,L] RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-d RewriteRule ^/examples/(.*)$ ajp://localhost:8009/examples/$1 [P,L] Require all granted Options Indexes CustomLog logs/tomcat_access.log combined ErrorLog logs/tomcat_error.log