WebSphere下配置HTTP压缩
WebSphere下配置HTTP压缩
背景
WebSphere本身的安装配置中并不包含HTTP压缩的模块,而是通过新增WebServer来实现的,WebSphere通过Plugin与WebServer进行通信,所有的HTTP请求通过WebServer来转发。WebServer上面可以实现请求过滤,内容压缩,以及负载均衡等功能。
WebServer通常可以是IIS(Internet Information Service),更常用的是IHS(IBM HTTP Server),本文以IHS为例。IHS本身是基于Apache Web Server进行的扩展,所以基本配置和Apache是一致的。
1 Installer
- 获取 IBM HTTP Server (IHS) 安装包,from C1G2KML.zip
- Unzip and run the launchpad.exe
2 Install IHS and WebSphere Plugin
- 运行后选择 IBM HTTP Server Installation
- 点击 Next 并选择IHS的安装路径, for example C:\IBM\HTTPServer
- 设置 HTTP Port 和 Administration port (保持默认值即可)
- 输入IHS管理员的用户名和密码,一般选择用本地系统用户登录启动即可,然后点击"Next" (For Admin Account, we can setup later, so can choose "Log on as a local system account"in this step.)
- HTTP Administration Server Authentication, input admin account like admin/admin in this step. 在这一步中输入admin的用户名密码,如 admin/admin
- IBM HTTP Server Plug-in for IBM WebSphere Application Server, input Web Server name like 'webserverIHS' or just use the default one. 指定Web服务器的名称,比如'webserverIHS' ,这个名称会在WebSphere的Admin Console的Web Servers页面中显示
- Click Next to Finish
- Copy the configure WebServer batch file (Example: configurewebserverIHS.bat,这个文件的名字后缀与前面指定的WebServer的名称是一致的) fromC:\IBM\HTTPServer\Plugins\bin to WebSphere App Server bin folder (Example:C:\IBM\WebSphere\AppServer\bin,注意是AppServer下面的bin目录,而非profiles/AppSrv01/bin目录)
- Run the configure WebServer batch file in WebSphere App Server bin folder. 运行这个配置脚本,会自动把IHS和WebSphere进行关联集成,可以通过访问IHS的端口来访问WebSphere安装的应用程序。
3 Setup HTTP Compression
Refer to Enabling Compression on IBM HTTP Server
- 打开 httpd.conf 文件,位于 C:\IBM\HTTPServer\conf 文件夹, 确保 LoadModule deflate_module 模块的注释已经去掉。
- 增加mod_deflate的配置 <IfModule mod_deflate.c> ,并加入对指定内容类型做过滤的Output Filter 。
- Examples like below

LoadModule deflate_module modules/mod_deflate.so <IfModule mod_deflate.c>
DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio
LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
CustomLog C:\IBM\HTTPServer\logs\deflate.log '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)'
<Location / >
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE text/plain text/xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE text/css text/javascript
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/atom+xml
AddOutputFilterByType DEFLATE text/javascript
# Insert filter
SetOutputFilter DEFLATE
# Don't compress images or binaries
SetEnvIfNoCase Request_URI \\.(?:gif|[jm]pe?g|png|t?gz|bz2*|zip|exe|iso|avi|swf)$ no-gzip dont-vary
</Location>
</IfModule>

4 Trouble Shooting
- Forget the admin password
Use below command to setup admin account
C:\IBM\HTTPServer\bin>htpasswd C:/IBM/HTTPServer/conf/admin.passwd admin
- Failed to startup IHS on Windows
Refer to scenarios of Experiencing an IBM HTTP Server Service logon failure on Windows operating systems
WebSphere下配置HTTP压缩的更多相关文章
- Linux(CentOS 6.7)下配置Mono和Jexus并且部署ASP.NET MVC3、4、5和WebApi(跨平台)
1.开篇说明 a. 首先我在写这篇博客之前,已经在自己本地配置了mono和jexus并且成功部署了asp.net mvc项目,我也是依赖于在网上查找的各种资料来配置环境并且部署项目的,而其在网上也已有 ...
- IIS7配置Gzip压缩 JS压强失败的原因
开启配置HTTP压缩(GZip) 在IIS7中配置Gzip压缩相比IIS6来说实在容易了许多,而且默认情况下就是启用GZip压缩的.如果没有,则可以再功能视图下找到“压缩”项,进入之后就会看到“静态内 ...
- windows 下配置 Nginx 常见问题(转)
windows 下配置 Nginx 常见问题 因为最近的项目需要用到负载均衡,不用考虑,当然用大名鼎鼎的Nginx啦.至于Nginx的介绍,这里就不多说了,直接进入主题如何在Windows下配置. 我 ...
- IIS7配置Gzip压缩
II7中自带了gzip功能,理论上应该比ii6配置起来应该简单一点,但是容易出的问题比较多.有的II7配置web服务器角色的时候可能没有安装启用动态内容压缩,所以这个钩子是灰色的,需要再次安装. 如图 ...
- windows 下配置 Nginx 常见问题
因为最近的项目需要用到负载均衡,不用考虑,当然用大名鼎鼎的Nginx啦.至于Nginx的介绍,这里就不多说了,直接进入主题如何在Windows下配置. 我的系统是win7旗舰版的,到官网下载最新版本 ...
- IIS7.5配置Gzip压缩解决方案(转)
开启配置HTTP压缩(GZip) 在IIS7中配置Gzip压缩相比IIS6来说实在容易了许多,而且默认情况下就是启用GZip压缩的.如果没有,则可以再功能视图下找到“压缩”项,进入之后就会看到“静态内 ...
- Linux下配置两个或多个Tomcat启动
Linux下配置两个或多个Tomcat启动 (2012-08-14 11:59:31) 转载▼ 标签: 杂谈 分类: linux_tomcat 步骤如下: (1)修改/etc/profile文件.添加 ...
- [转帖]IIS7配置Gzip压缩
IIS7配置Gzip压缩 https://www.cnblogs.com/coce/p/6804373.html II7中自带了gzip功能,理论上应该比ii6配置起来应该简单一点,但是容易出的问 ...
- 在Linux虚拟机下配置tomcat
1.到Apache官网下载tomcat http://tomcat.apache.org/download-80.cgi 博主我下载的是tomcat8 博主的jdk是1.8 如果你们的jdk是1.7或 ...
随机推荐
- FreeSSHD login with permission denied
登录遇到问题: Permission denied, please try again. 解决方法: 在window中使用freesshd开启ssh后,客户端登陆时报 access denied错误 ...
- Use Slim to overview model in Tensorflow like model.summary() in Keras
model.summary() in Tensorflow like Keras Use Slim Example: import numpy as np from tensorflow.python ...
- JavaScript长时间未操作自动退出登录
主要是通过mouseover 来监听有没有进行当前页面操作,通过未操作时间和设定退出的时间做比较,从而退出登录. var oldTime = new Date().getTime(); var new ...
- spring 使用外部属性文件
一.PropertyPlaceholderConfigurer spring提供的PropertyPlaceholderConfigurer实现类能够使Bean在配置时引用外部属性文件. Proper ...
- 查看neighbors大小对K近邻分类算法预测准确度和泛化能力的影响
代码: # -*- coding: utf-8 -*- """ Created on Thu Jul 12 09:36:49 2018 @author: zhen &qu ...
- java面试题之----spring MVC的原理和MVC
1.什么是mvc? 1.1原始比较初级的设计模式: 1.2 MVC设计模式 2MVC设计模式的优势与核心在于其能解耦和: 传统的设计模式相当于是一个串联的设计,只要其中一个环节出了问题便会使下一环节中 ...
- C++中cin.clear()的用法
我们谈谈cin.clear的作用,第一次看到这东西,很多人以为就是清空cin里面的数据流,而实际上却与此相差很远,首先我们看看以下代码: #include <iostream> usin ...
- EF的CodeFirst模式自动迁移(适用于开发环境)
EF的CodeFirst模式自动迁移(适用于开发环境) 1.开启EF数据迁移功能 NuGet包管理器------>程序包管理控制台---------->Enable-Migrations ...
- jQuery搜索框自动补全功能插件实现-autocomplete.js
最近用nodeclub实现股票的输入关键字自动补全股票信息进行搜索功能,原先用jQuery-ui,结果jQuery-ui库太大,所以考虑用其他插件,最终选择使用autocomplete.js,控件简单 ...
- Git命令实现本地文件推送到git仓库
前提: ①确定本机(windows环境)已经安装git(https://git-scm.com/downloads) ②建立好远程Git仓库 1.在你想推送的文件夹下:右键→选择Git Bath ...