Configure mutiple IBM HTTP Server / Other Apache based WEB server on 1 physical server (Section 2)

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.
 
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
 
 
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.
 
 
Found! It‘s httpd.exe, so it is 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 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 [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 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:
 
 
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......

Configure mutiple IBM HTTP Server / Other Apache based WEB server on 1 physical server (Section 2),古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。