わかりました、apache IBM HTTP Server WAS 6.1セットアップができました
certs正しくインストールされ、ページを正常にロードできhttpますhttps。
j_security_check経由で認証が成功した後https、現在承認されているページ (および後続のすべてのページ) を としてロードしhttpます。
mod_rewriteWebサーバー上で本当に簡単に実行できるはずのアプリケーションコードを変更したくないので、これをすべて機能させたいと思っています。
これはうまくいくと思いますが、そうではなく、何らかの形j_security_checkでバイパスしているためだと思います。mod_rewrite
RewriteCond %{HTTPS} =off
RewriteCond %{THE_REQUEST} login\.jsp.*action=init [OR]
RewriteCond %{THE_REQUEST} login\.jsp.*action=submit
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L] <<-- this rule is working
RewriteCond %{HTTPS} =on
RewriteCond %{THE_REQUEST} !login\.jsp.*action=init [OR]
RewriteCond %{THE_REQUEST} !login\.jsp.*action=submit
RewriteRule .* http://%{SERVER_NAME}%{REQUEST_URI} [R,L] <--- this rule is not working or the condition is not returning true
[R,L]実行されたルールがリクエストで実行される最後のルールになり、それに応じてリダイレクトされることを私は知っています。
少しググった後、この小さな宝石を見つけました。
mod_rewrite: My rules are ignored. Nothing is written to the rewrite log.
The most common cause of this is placing mod_rewrite directives at global scope (outside of any VirtualHost containers) but expecting the directives to apply to requests which were matched by a VirtualHost container.
In this example, the mod_rewrite configuration will be ignored for requests which are received on port 443:
RewriteEngine On
RewriteRule ^index.htm$ index.html
<VirtualHost *:443>
existing vhost directives
</VirtualHost>
Unlike most configurable features, the mod_rewrite configuration is not inherited by default within a <VirtualHost > container. To have global mod_rewrite directives apply to a VirtualHost, add these two extra directives to the VirtualHost container:
<VirtualHost *:443>
existing vhost directives
RewriteEngine On
RewriteOptions Inherit
</VirtualHost>
virtualhostマシンのIPを指す単一の宣言にInherit宣言を追加しても、port 443少しは役に立ちませんでした。
これで、アプリ サーバーが9080と でそれぞれ通信していることがわかりましたが、Web サーバーで94431 つが見つかりません。virtualhosthttpd.conf
認証されていないときに、さまざまな書き換えルールでいくつかのテストを行い、mod rewriteコードが機能することを確認しました..
では、認証後に websphere に mod rewrite を使用させるにはどうすればよいですか?
Web サーバーは認証されていないリクエストにのみ使用され、その後、何らかのブラックボックス コンテナーが何らかの方法ですべてを提供するようです。