리눅스

아파치 톰캣 서버 설정

초이짬 2014. 6. 4. 16:22
728x90

==httpd.conf===
Listen 80

#mod_jk 연결
LoadModule jk_module modules/mod_jk.so
<IfModule jk_module>
JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JklogLevel info
JkMount /*.jsp ajp13
JkMount /*.action ajp13
</IfModule>


ServerName www.서버url:80
# Virtual hosts 아파치 버추얼 호스트
Include conf/extra/httpd-vhosts.conf



==httpd-vhosts.conf===
NameVirtualHost *:80

#국무조정실 세종시 2013-11-05
<VirtualHost *:80>
ServerAdmin 관리자이멜
DocumentRoot D:\webtest\ROOT(디렉토리경로)

ServerName 서버url

ErrorLog logs/sejong-error_log
CustomLog logs/sejong-access_log common
<Directory "D:\webtest\ROOT(디렉토리경로)">
AllowOverride None
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all


<IfModule mod_deflate>
AddOutputFilterByType DEFLATE text/plain text/html text/xml
AddOutputFilterByType DEFLATE application/xhtml+xml application/xml application/rss+xml
AddOutputFilterByType DEFLATE text/css application/javascript application/x-javascript
AddOutputFilterByType DEFLATE audio/midi

DeflateCompressionLevel 9

BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.xx에는 HTML만 압축해서 보냄
BrowserMatch ^Mozilla/4\.0[678] no-gzip # Netscape 4.06~4.08에는 압축해서 보내지 않음
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html # 자신을 Mozilla로 알리는 MSIE에는 그대로 압축해서 보냄
</ifModule>
</Directory>

JkMount /*.* tomcat1
JkMount /*.jsp tomcat1
JkMount /*.do tomcat1
JkMount /servlet/* tomcat1
</VirtualHost>

#intra business 2014-01-03

 


============tomcat server.xml==============


<Service name="Catalina">

  
    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" URIEncoding="UTF-8"/>
 
    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8"/>


    <Engine name="Catalina" defaultHost="localhost">

   
      <Realm className="org.apache.catalina.realm.LockOutRealm">
   
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>
 
    <Host name="서버url"  appBase="D:\webtest(디렉토리경로)" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
   <Context path="" docBase="ROOT" debug="0" reloadable="true"/>
      </Host>
   
    </Engine>
  </Service>







728x90