Continue from the last article ...
2) confirmed the port of the new added IP is isn't listened by any other services.
Why need to test this? This was to ensure the 80/443 port of the new created IP was not listened by any other application. Test method:telnet 192.168.67.101 80. OK, the command returned a blank screen, it means the port of 192.168.67.101 has been listened by some application. Then we must find out which application are listen it so that we could release it. Windows:netstat-ano | Findstr:80linux:netstat-ano | GREP:80 now we know a application with pid:2836 are listening 0.0.0.0:80, this means all the IP address of Port would be Listened by this application. Let's see which application it's.Windows:Use TaskManager. By default, the PID column is not being listed in the Task Manager, and you could use this option to list it out. found! It's httpd.exe, so it's a Apache process, actually I installed IHS, so it's the IHS service that I created.Linux:It ' s simple, just use a Command:ps-ef | grep 2836. Here I won ' t show the command, if you're linuxer, you'll know how to utilize the PS tool. So now, we topic become how to release the port 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 [email protected]
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 that the RED line, it means my IHS service would listen the port, 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? 'll show it later.) Test Again:connection failed to the 192.168.67.101 port, means 192.168.67.101:80 has been released. Then we could start and other steps.
TBC ...