Такой конфиг включает максимальный уровень логирования mod_rewrite, что значительно упрощает отладку конфига:
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 9
RewriteLog /var/log/apache2/rewrite.log
RewriteLogLevel 9
ProxyPass / ajp://localhost:8009/Context/
ProxyPassReverse / ajp://localhost:8009/Context/
RewriteEngine onСпасибо http://stackoverflow.com/questions/6063339/spring-security-and-ajp-proxy.
RewriteRule ^/Context/(.*)$ /$1 [R=301]
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
RewriteEngine OnЕсли некоторые URL`ы требуется всё же обрабатывать по HTTPS, нужно исключить их из правила:
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=permanent]
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond $0 !/needhttps/
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
Redirect permanent /xxx http://ya.ru, то при обращении по URL`у www.myserver.com/xxx вместо браузерного редиректа на Яндекс мы увидим результат проксирования запроса на URL http://google.com/xxx. Чтобы заставить Apache работать, как мы хотим, нужно исключить путь /xxx из проксирования. В таком случае директива Redirect отработает. Получится конфиг вида:
ProxyPass / http://google.com/
ProxyPass /xxx !
Redirect permanent /xxx http://ya.ru
ProxyPass / http://google.com/
ProxyPass /xxx/ balancer://mybalancer/
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
ProxyPass /xxx/ balancer://mybalancer/
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond $0 !/xxx/
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
PHP Startup: Unable to load dynamic library '.../php_pgsql.dll' - Не найден указанный модульНу и модуль, естественно, не загружается.
WARNING: MaxClients of 1000 would require 40 servers,Директивы же ServerLimit в конфиге нету, и её добавление туда ситуации не меняет.
and would exceed the ServerLimit value of 16.
Automatically lowering MaxClients to 400. To increase,
please see the ServerLimit directive.
SSLProxyEngine on
ProxyPass /load-balancer/ balancer://myhttpsbalancer/
ProxyPassReverse /load-balancer/ https://192.168.0.101:8000/services/
ProxyPassReverse /load-balancer/ https://192.168.0.101:8001/services/
<Proxy balancer://myhttpsbalancer>
BalancerMember https://192.168.0.101:8000/services/ loadfactor=50
BalancerMember https://192.168.0.101:8001/services/ loadfactor=50
</Proxy>
SSLProxyEngine on
ProxyPass /load-balancer/ balancer://myhttpsbalancer/
ProxyPassReverse /load-balancer/ https://192.168.0.101:8000/services/
ProxyPassReverse /load-balancer/ https://192.168.0.101:8001/services/
<Proxy balancer://myhttpsbalancer>
BalancerMember https://192.168.0.101:8000/services loadfactor=50
BalancerMember https://192.168.0.101:8001/services loadfactor=50
</Proxy>