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

  1. 获取 IBM HTTP Server (IHS) 安装包,from C1G2KML.zip
  2. Unzip and run the launchpad.exe

2 Install IHS and WebSphere Plugin

  1. 运行后选择 IBM HTTP Server Installation
  2. 点击 Next 并选择IHS的安装路径, for example C:\IBM\HTTPServer
  3. 设置 HTTP Port 和 Administration port (保持默认值即可)
  4. 输入IHS管理员的用户名和密码,一般选择用本地系统用户登录启动即可,然后点击"Next" (For Admin Account, we can setup later, so can choose "Log on as a local system account"in this step.)
  5. HTTP Administration Server Authentication, input admin account like admin/admin in this step. 在这一步中输入admin的用户名密码,如 admin/admin
  6. 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页面中显示
  7. Click Next to Finish
  8. 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目录)
  9. 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

  1. 打开 httpd.conf 文件,位于 C:\IBM\HTTPServer\conf 文件夹, 确保 LoadModule deflate_module 模块的注释已经去掉。
  2. 增加mod_deflate的配置 <IfModule mod_deflate.c> ,并加入对指定内容类型做过滤的Output Filter 。
  3. 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压缩的更多相关文章

  1. Linux(CentOS 6.7)下配置Mono和Jexus并且部署ASP.NET MVC3、4、5和WebApi(跨平台)

    1.开篇说明 a. 首先我在写这篇博客之前,已经在自己本地配置了mono和jexus并且成功部署了asp.net mvc项目,我也是依赖于在网上查找的各种资料来配置环境并且部署项目的,而其在网上也已有 ...

  2. IIS7配置Gzip压缩 JS压强失败的原因

    开启配置HTTP压缩(GZip) 在IIS7中配置Gzip压缩相比IIS6来说实在容易了许多,而且默认情况下就是启用GZip压缩的.如果没有,则可以再功能视图下找到“压缩”项,进入之后就会看到“静态内 ...

  3. windows 下配置 Nginx 常见问题(转)

    windows 下配置 Nginx 常见问题 因为最近的项目需要用到负载均衡,不用考虑,当然用大名鼎鼎的Nginx啦.至于Nginx的介绍,这里就不多说了,直接进入主题如何在Windows下配置. 我 ...

  4. IIS7配置Gzip压缩

    II7中自带了gzip功能,理论上应该比ii6配置起来应该简单一点,但是容易出的问题比较多.有的II7配置web服务器角色的时候可能没有安装启用动态内容压缩,所以这个钩子是灰色的,需要再次安装. 如图 ...

  5. windows 下配置 Nginx 常见问题

    因为最近的项目需要用到负载均衡,不用考虑,当然用大名鼎鼎的Nginx啦.至于Nginx的介绍,这里就不多说了,直接进入主题如何在Windows下配置. 我的系统是win7旗舰版的,到官网下载最新版本 ...

  6. IIS7.5配置Gzip压缩解决方案(转)

    开启配置HTTP压缩(GZip) 在IIS7中配置Gzip压缩相比IIS6来说实在容易了许多,而且默认情况下就是启用GZip压缩的.如果没有,则可以再功能视图下找到“压缩”项,进入之后就会看到“静态内 ...

  7. Linux下配置两个或多个Tomcat启动

    Linux下配置两个或多个Tomcat启动 (2012-08-14 11:59:31) 转载▼ 标签: 杂谈 分类: linux_tomcat 步骤如下: (1)修改/etc/profile文件.添加 ...

  8. [转帖]IIS7配置Gzip压缩

    IIS7配置Gzip压缩 https://www.cnblogs.com/coce/p/6804373.html   II7中自带了gzip功能,理论上应该比ii6配置起来应该简单一点,但是容易出的问 ...

  9. 在Linux虚拟机下配置tomcat

    1.到Apache官网下载tomcat http://tomcat.apache.org/download-80.cgi 博主我下载的是tomcat8 博主的jdk是1.8 如果你们的jdk是1.7或 ...

随机推荐

  1. wcf json参数返回失败问题

    问题: 最近写了一个接口,提示连接失败,于是在本地发布了一下,然后模拟post请求进行本地调试,发现能正常进入接口,中间也没问题,一直走到最后一步return时,也能return,但是就是返回不了数据 ...

  2. mysql 5.7 线程阻塞处理

    出现的错误: ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction 解决办法: 查看sleep的进程 m ...

  3. php7.27: export excel from mysql

    https://stackoverflow.com/questions/15699301/export-mysql-data-to-excel-in-php https://github.com/PH ...

  4. 安装SQL server 2016遇到问题

    microsoft R open https://mran.microsoft.com/download/ https://mran.revolutionanalytics.com/download/ ...

  5. Error running tomcatUnable to open debugger port (127.0.0.1 50181) java.net.B

    1.把tomcat删除,重新建一个,tomcat就会重新自动使用一个端口了 2.自己手动调一下端口 我用的是第二种,手动调了下,最开始的端口是:50181,该成了50182,就可以了.

  6. 安卓开发_WebView如何在Fragment中使用

    之前学习了如何在activity中使用WebView控件来显示网页. 在我的实际开发中,有需要在Fragment中用到WebView控件的,那么就百度学习了一下 其实很简单,但是当然不是和在Activ ...

  7. Flume Channel Selector

    Flume 基于Channel Selector可以实现扇入.扇出. 同一个数据源分发到不同的目的,如下图. 在source上可以定义channel selector: 1 2 3 4 5 6 7 8 ...

  8. js实现页面锚点定位动画滚动

    项目上需要的效果,个人不想用jquery实现,想着用js自己试试,花了点儿时间,终于实现.. 上干货.. function scrollTo(y, duration) { /*y:目标纵坐标,dura ...

  9. python第十五天-原来还差一份作业

    作业 1: 员工信息表程序,实现增删改查操作 可进行模糊查询,语法至少支持下面3种: select name,age from staff_table where age > 22 select ...

  10. alsa声卡分析alsa-utils调用过程(二)-tinymixer

    继上一篇文章:http://www.cnblogs.com/linhaostudy/p/8515277.html 三.tinymixer调用分析:(tinymixer.log搜索节点:/dev/snd ...