A. Mục đích:
cấu hình 1 webserver test trên môi trường local windows
- http://www.wassslsample.com (port 80) - http://127.0.0.1/
- https://www.wassslsample.com (port 443) - https://127.0.0.1/
B. Các bước cần làm
-1 Cài đặt WAS server, IBM HTTPServer (IHS), IBM Plugins
Bước này làm theo hướng dẫn là trong bộ cài đặt là OK hoặc tham khảo thêm
Thư mục cài was:C:\IBM\WebSphere
thư mục cài httpserver:C:\IBM\HTTPServer
thư mục cài plugins:C:\IBM\HTTPServer\Plugins
- Tạo 1 app server test: server1
- Tạo 1 webserver: webserver1
(https://www.genuitec.com/products/myeclipse/learning-center/websphere/installing-websphere-7-for-developers/)
-2 Tạo Self-Cert và Key store cho webserver
Sử dụng IKeyMan (C:\IBM\HTTPServer\bin\ikeyman.bat)
Nhớ tạo stash password file
-3 Cấu hình IHS
Sửa file cấu hình: C:\IBM\HTTPServer\conf\httpd.conf
Listen *:443
Listen *:80
LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
## IPv6 support:
#Listen [::]:443
<VirtualHost 127.0.0.1:443>
ServerName www.wassslsample.com
DocumentRoot "c:\IBM\HTTPServer\htdocs"
SSLEnable
SSLServerCert www.wassslsample.com
SSLClientAuth None
SSLProtocolDisable SSLv2
</VirtualHost>
SSLDisable
KeyFile "C:\IBM\HTTPServer\ssl\ihsKeyFile.kdb"
SSLV2Timeout 100
SSLV3Timeout 1000
LoadModule was_ap22_module "C:\IBM\HTTPServer\Plugins\bin\32bits\mod_was_ap22_http.dll"
WebSpherePluginConfig "C:\IBM\HTTPServer\Plugins\config\webserver1\plugin-cfg.xml"
NameVirtualHost www.wassslsample.com:80
<VirtualHost 127.0.0.1:80>
ServerName www.wassslsample.com
DocumentRoot "c:\IBM\HTTPServer\htdocs"
#SSLServerCert selfSigned
</VirtualHost>
http://www-01.ibm.com/support/docview.wss?uid=swg21179559#step2
-4 Cấu hình file host
Sửa host file (c:\Windows\System32\drivers\etc) như sau:
127.0.0.1 www.wassslsample.com
127.0.0.1 wassslsample.com
Sau khi cấu hình xong Stop/start webserver là OK
Kết quả như sau:
http://www.wassslsample.com
https://www.wassslsample.com