码迷,mamicode.com
首页 > 其他好文 > 详细

配置示例

时间:2019-02-10 12:23:15      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:ogg   accesslog   erro   catalina   star   nts   utf-8   nginx   efault   

tomcat server.conf  

<?xml version="1.0" encoding="UTF-8"?>

<Server port="8215" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>


  <Service name="Catalina">

    <Connector port="8216" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

    <Engine name="Catalina" defaultHost="localhost">
      <Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true">
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t "%r" %s %b" />
        <Context path="/" docBase="/data/project/travel-admin"/>
      </Host>
    </Engine>
  </Service>
</Server> 

 

nginx.conf 示例

#user  nobody;
worker_processes  1;
 
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
 
#pid        logs/nginx.pid;
 
 
events {
    worker_connections  1024;
}
 
 
http {
    include       mime.types;
    default_type  application/octet-stream;
 
    sendfile        on;
 
    upstream kooteam.travelor.cn { 
            server 127.0.0.1:7053;
    }
 
 
    server {
        listen       80;
        server_name kooteam.travelor.cn;
 
        location / {
            proxy_pass  http://127.0.0.1:7503;   
            proxy_set_header    X-Real-IP   $remote_addr;   
        }
    }
     
}

  

 

配置示例

标签:ogg   accesslog   erro   catalina   star   nts   utf-8   nginx   efault   

原文地址:https://www.cnblogs.com/sanmubird/p/10358903.html

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