码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2014-07-19 20:06:37      阅读:354      评论:0      收藏:0      [点我收藏+]

标签:style   http   java   color   strong   os   

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.
bubuko.com,布布扣
 
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
 
bubuko.com,布布扣
 
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.
 
bubuko.com,布布扣bubuko.com,布布扣
 
Found! It‘s httpd.exe, so it is a Apache process, actually I installed IHS, so it‘s the IHS service that I created.
 
bubuko.com,布布扣
 
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:
 
bubuko.com,布布扣
 
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),布布扣,bubuko.com

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

标签:style   http   java   color   strong   os   

原文地址:http://www.cnblogs.com/delly/p/3849776.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!