zoukankan      html  css  js  c++  java
  • Configure mutiple IBM HTTP Server / Other Apache based WEB server on 1 physical server (Section 3)

    This Section will continue the actual configure for IHS related files.

    3) Copy the httpd.conf file to httpd2.conf, and modify them.
     
    Now Virtual IP have been added, and it's port 80 have been released, so we can start to do some needed configure. 
     
    Firstly, copy the httpd.conf file as httpd2.conf. For Apache based server, 1 Apache server instance need 1 httpd.conf file.
     
    And what we need to be configured includes:
     
    PidFile logs/httpd2.pid
    DocumentRoot "C:/WEB_SITE/myaddress2.com"

    Listen 192.168.67.101:80
    <VirtualHost 192.168.67.101:80>
    ...
    </VirtualHost>
     
    TransferLog "|bin/rotatelogs.exe C:/WEB_LOG/myaddress2.com/access.%Y%m%d.log 86400 +480"
    ErrorLog "|bin/rotatelogs.exe C:/WEB_LOG/myaddress2.com/error.%Y%m%d.log 86400 +480"
     
    Now, if we start a new IHS instance with this configure file, then it will be a different instance.
     
    4) Create the needed folders (DocumentRoot, log folder, etc.) and add Hostname/IP entry in the hosts file (if needed).
     
    Actually what we need to create is only:
     
    DocumentRoot "C:/WEB_SITE/myaddress2.com"   and 
    TransferLog "|bin/rotatelogs.exe C:/WEB_LOG/myaddress2.com/access.%Y%m%d.log 86400 +480"
     
    And for testing purpose, we put an index.html file into the document root folder:
     
     
    After that, we'd better add the domain of the IP into the hosts file so that we can access our website via both IP and domain name, we can define any domain name for our IP because it's a Internal IP.
     
    File location: Windows: C:WINDOWSsystem32driversetchosts       Linux: /etc/hosts
     
     
    5) Start the IHS/Apache service.
     
    Go to the IHS homein folder, we will use the apache.exe to start the instance with the new httpd2.conf file.
     
    Use this command to verify if the syntax of the config file is fine: apache.exe -t -f C:IBMHTTPServerconfhttpd2.conf
     
     
    In order to start the service, there are some difference between Linux and Windows:
     
    Linux:
    This command will works: apache.exe -k start -f C:IBMHTTPServerconfhttpd2.conf
     
    Windows:
    We need to add the new service into the Windows service manager, and then start it via the Windows service UI:
     
    Firstly, add the service:
    C:IBMHTTPServerin>apache.exe -k install -n "ihs-myaddress2.com" -f C:IBMHTTPServerconfhttpd.conf
     
     
    Succeed! Then open services.msc, can see it have been added successfully.
     
    Right click, and click start.
     
    OK, the service have been started.
     
    6) Verify if the changes works.
     
    How to test? 
     
    Yeah, we are configuring a website infrastructure, of course the best way is test via browser. 
     
    Our web page have been displayed successfully. And you can continue to put more web pages into the document root folder.
     
     
     
    Now, start to write your own website via maybe html and JS, if want to release it to Internet, may need some port forward configure in your home router device, and that will be another toy what can be play with.
     
    Enjoy it! 
  • 相关阅读:
    [na]wac无线控制器集中转发部署的几种情况
    [na]windows2008-AD域的安装
    [na]数据链路层&网络层协议小结截图版
    [na]tcp&udp层各协议小结
    [na]交换机接口文档
    [na]二层sw数据交换
    [na]wireshark排查打印机问题
    [na]ip包格式
    [na]ping提示&各系统默认的TTL值
    【VS开发】C++异常处理操作
  • 原文地址:https://www.cnblogs.com/delly/p/3849779.html
Copyright © 2011-2022 走看看