Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Javaクラスは様々なリソースのパスに基づき実行されます。仮想ホストのスクリプト要素はJavaクラスと特定のリソース・パスを関連付ける際に利用されます。trace属性はHTTPトランザクションのJSMトレースを可能にします。 

httpd.xml

Code Block
languagejava
<?xml version="1.0" encoding="UTF-8"?>
 
<configuration>
 
  <instance  <instance name="WebServer" active="true" root="www/instance/htdocs" index="index.html">
 
    <errorlog enabled="true" file="www/instance/logs/e rror.log"/>
 
    <accesslog enabled="true"  <listenfile="www/instance/logs/a ccess.log"/>
 
    <listen port="4563" interface="*ALL" backlog="256"
            secure            secure="false" store="pki/wwwssl.jks" password="password"
            buffersend            buffersend="-1" bufferreceive="-1" nodelay="false" timeout="5"/>
 
    <access>
 
      <!--
            Once a true  <access>

      <!--
            Once a true condition condition occurs no more evaluations are done.
 
            <deny             <deny address="*"/>
            <deny             <deny address="10.2.1.45"/>
   
            <allow             <allow address="*"/>
            <allow             <allow address="10.2.1.45"/>
            -->
 
    <    </access>
 
    <mimetype>    <mimetype>

      < 
      <!--
            These            These are the default values.
                -->
 
      <map      <map extension="png"  type  type="image/png"/>
      <map      <map extension="gif"  type  type="image/gif"/>
      <map      <map extension="jpg"  type  type="image/jpeg"/>
      <map       <map extension="jpeg" type="image/jpeg"/>
      <map      <map extension="tiff" type="image/tiff"/>
      <map       <map extension="ico"  type  type="image/x-icon"/>
      <map extension      <map extension="svg"  type  type="image/svg+xml"/>
      <map      <map extension="pdf"  type  type="application/pdf"/>
      <map      <map extension="css"  type  type="text/css; charset=utf-8"/>
      <map       <map extension="xsl"  type  type="text/xls; charset=utf-8"/>
      <map      <map extension="xml"  type  type="text/xml; charset=utf-8"/>
      <map       <map extension="htm"  type  type="text/html; charset=utf-8"/>
      <map      <map extension="html" type="text/html; charset=utf-8"/>
      <map      <map extension="js"   type   type="application/x-javascript; charset=utf-8"/>
 
    <    </mimetype>
 
    <virtual    <virtual host="*" active="true">

      <access>

        < 
      <access>
 
        <!--
              Once              Once a true condition occurs no more evaluations are done.
 
              <deny               <deny address="*"/>
              <deny               <deny address="10.2.1"/>
              <deny               <deny address="10.2.1.45"/>

              <allow  
              <allow address="*"/>
              <allow address="              <allow address="10.2.1"/>
              <allow               <allow address="10.2.1.45"/>
 
              <deny               <deny useragent="*"/>
              <deny               <deny useragent="?"/>
              <deny               <deny useragent="edge"/>
              <deny              <deny useragent="opera"/>
              <deny              <deny useragent="chrome"/>
              <deny useragent="chromesafari"/>
              <deny               <deny useragent="safariandroid"/>
              <deny               <deny useragent="androidfirefox"/>
              <deny               <deny useragent="firefoxexplorer"/>
              <deny               <deny useragent="explorerimac"/>
              <deny               <deny useragent="imacipad"/>
              <deny               <deny useragent="ipadipod"/>
              <deny               <deny useragent="ipodiphone"/>
              <deny               <deny useragent="iphoneiwork"/>
              <deny               <deny useragent="iworkmsnbot"/>
              <deny               <deny useragent="msnbotlansaua"/>
              <deny               <deny useragent="lansauayahoobot"/>
              <deny useragent="yahoobot"/>
              <deny               <deny useragent="googlebot"/>
              <deny              <deny useragent="longreach"/>

              <allow  
              <allow useragent="*"/>
              <allow               <allow useragent="?"/>
              <allow               <allow useragent="edge"/>
              <allow              <allow useragent="opera"/>
              <allow               <allow useragent="chrome"/>
              <allow useragent="safari"/>
              <allow
              <allow useragent="androidsafari"/>
              <allow               <allow useragent="firefoxandroid"/>
              <allow               <allow useragent="explorerfirefox"/>
              <allow               <allow useragent="imacexplorer"/>
              <allow               <allow useragent="ipadimac"/>
              <allow               <allow useragent="ipodipad"/>
              <allow               <allow useragent="ipod"/>
              <allow useragent="iphone"/>
              <allow              <allow useragent="iwork"/>
              <allow               <allow useragent="msnbot"/>
              <allow               <allow useragent="lansaua"/>
              <allow               <allow useragent="yahoobot"/>
              <allow               <allow useragent="googlebot"/>
              <allow
              <allow useragent="longreach"/>
 
              <deny               <deny contentlength="4096"/>    >     Deny access if content length is greater than value
              <allow               <allow contentlength="4096"/>>       Allow access if content length less than or equal to value
 
              Zero               Zero content length from the browser is a special case and access is allowed for no content connections
        -->
        <!--
              The content connections
        -->
        <!--
              The default is to allow access for all addresses, useragents and content lengths
              -->

      < 
      </access>
 
      <script>
 
        <match         <match uri="/ping.jsp" class="com.lansa.jsm.JSMHTTPServicePing" trace="false"/>
 
        <match         <match uri="/" class="com.lansa.jsm.JSMHTTPServiceFile" trace="false">
           <parameter            <parameter name="cache.maxage"       value       value="28800"/>
           <parameter            <parameter name="cache.maxage.pdf"   value   value="28800"/>
           <parameter/>
           <parameter name="cache.maxage.image" value="28800"/>
        <        </match>
 
 
      <mimetype>

        <map      </script>
 
      <mimetype>
 
        <map extension="pdf" type="application/pdf"/>

        < 
        <!--
              Defaults               Defaults to instance mimetype
                    -->

      < 
      </mimetype>
 
    <    </virtual>
 
  <  </instance>
 
</configuration> 

...

カスタムの Java クラスを書いて、HTTP サーバーからの HTTP 要求を処理するには、Java クラスで com.lansa.jsm.JSMHTTPService のインターフェースが実装されていなければなりません。

...