设为首页 收藏本站
查看: 922|回复: 0

[经验分享] Configure mutiple IBM HTTP Server / Other Apache based WEB server on 1 physical

[复制链接]

尚未签到

发表于 2015-10-4 07:47:16 | 显示全部楼层 |阅读模式
  Continue from the last article......


2) Confirmed the 80 port of the new added IP is not listened by any other services.

Why need to test this? This is to ensure the 80/443 port of the new created IP is not listened by any other application.

Test method: telnet 192.168.67.101 80.
http://onexin.iyunv.com/source/plugin/onexin_bigdata/file:///Users/qiaodeli/Library/Containers/com.evernote.Evernote/Data/Library/Application%20Support/Evernote/accounts/Evernote/qiaodeli111/content/p62/3fefc07929bc0b0ef8b64aafa5e8f768.png

OK, the command returned a blank screen, it means the port 80 of 192.168.67.101 have been listened by some application. Then we must find out which application is listen it so that we could release it.
Windows: netstat -ano | findstr :80
Linux: netstat -ano | grep :80

http://onexin.iyunv.com/source/plugin/onexin_bigdata/file:///Users/qiaodeli/Library/Containers/com.evernote.Evernote/Data/Library/Application%20Support/Evernote/accounts/Evernote/qiaodeli111/content/p62/7127a0bf52b315be61277a7de7390479.png

Now we know a application with PID: 2836 is listening 0.0.0.0:80, this means all the IP address 80 port will be listened by this application. Let's see which application it is.

Windows: Use Taskmanager. By default, the PID column will not be listed in the task manager, you may use this option to list it out.

http://onexin.iyunv.com/source/plugin/onexin_bigdata/file:///Users/qiaodeli/Library/Containers/com.evernote.Evernote/Data/Library/Application%20Support/Evernote/accounts/Evernote/qiaodeli111/content/p62/b5a9ba6bb51e4227ee53827482258ff2.pnghttp://onexin.iyunv.com/source/plugin/onexin_bigdata/file:///Users/qiaodeli/Library/Containers/com.evernote.Evernote/Data/Library/Application%20Support/Evernote/accounts/Evernote/qiaodeli111/content/p62/3eef899809b270d8b39a82b783e05b25.png

Found! It's httpd.exe, so it is a Apache process, actually I installed IHS, so it's the IHS service that I created.

http://onexin.iyunv.com/source/plugin/onexin_bigdata/file:///Users/qiaodeli/Library/Containers/com.evernote.Evernote/Data/Library/Application%20Support/Evernote/accounts/Evernote/qiaodeli111/content/p62/a777251a926802db8af2493c77f6599e.png

Linux: it's simple, just use a command: ps -ef | grep 2836. Here I won't show the command, if you are Linuxer, you will know how to utilize the ps tool.


So now, our topic become how to release the port 80 of the new virtual IP: 192.168.67.101.

Let's see my configuration file. Here I list a simple httpd.conf file of the IHS:

ServerRoot "C:\IBM\HTTPServer"
PidFile logs/httpd.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 10
<IfModule mpm_winnt.c>
  ThreadLimit 2000
  ThreadsPerChild 2000
  MaxRequestsPerChild  0
</IfModule>
Win32DisableAcceptEx
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule alias_module modules/mod_alias.so
LoadModule dir_module modules/mod_dir.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
LoadModule deflate_module modules/mod_deflate.so

ServerAdmin you@your.address
ServerName myaddress
UseCanonicalName Off
DocumentRoot "C:/WEB_SITE/myaddress.com"

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
DirectoryIndex index.html
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
TypesConfig conf/mime.types
#DefaultType text/html
DefaultType text/plain
<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
ErrorLog logs/www_aia_error.log
LogLevel warn
LogFormat "%h %v %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{Cookie}i\""
CustomLog logs/www_aia_access.log common
ServerTokens Prod
ServerSignature Off
AddType application/x-tar .tgz
AddType image/x-icon .ico
AddHandler type-map var
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully
RewriteEngine On
RewriteCond %{REQUEST_METHOD} !^(GET|HEAD|POST)$
RewriteRule .* - [F]
##Need to remove
Loadmodule status_module modules/mod_status.so
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 10.50.165.0/255.255.255.0
</Location>
##Need to remove
Listen *:80
<VirtualHost *:80>
SSLDisable
EnableSendfile off
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
DefaultType text/html
ErrorDocument 500 /500.html
ErrorDocument 404 /404.html
AccessFileName .asp
<Files ~ (\.asp$)>
    Order allow,deny
    Deny from all
</Files>
DocumentRoot C:/WEB_SITE/myaddress.com
TransferLog "|bin/rotatelogs.exe C:/WEB_LOG/myaddress.com/access.%Y%m%d.log 86400 +480"
ErrorLog "|bin/rotatelogs.exe C:/WEB_LOG/myaddress.com/error.%Y%m%d.log 86400 +480"
</VirtualHost>

Please note the RED line, it means my IHS service will listen the port 80 of all the IP on this server. So let's modify it as below:

Listen 192.168.67.100:80
<VirtualHost 192.168.67.100:80>


And then restart the service (how to restart? will show it later.) Test again:

http://onexin.iyunv.com/source/plugin/onexin_bigdata/file:///Users/qiaodeli/Library/Containers/com.evernote.Evernote/Data/Library/Application%20Support/Evernote/accounts/Evernote/qiaodeli111/content/p62/abe6e30a6d6e03d996c8ad5df3fca476.png

Connection failed to the 192.168.67.101 port 80, means 192.168.67.101:80 have been released. Then we could start other steps.


TBC......

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-122328-1-1.html 上篇帖子: Linux环境下IBM WebSphere Portal v8.5独立服务器启用安全性操作记录_失败案例 下篇帖子: http://www.ibm.com/developerworks/cn/linux/l-cn-spidermonkey/index.html
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表