zoukankan      html  css  js  c++  java
  • ubuntu18配置jetty9

    安装

    sudo apt install jetty9
    

    安装路径

    /usr/share/jetty9

    11

    配置日志

    进入/usr/share/jetty9目录执行以下命令

    sudo java -jar start.jar --add-to-start=console-capture
    sudo java -jar start.jar --add-to-start=logging-jetty
    

    编辑start.d下的console-capture.ini文件,修改为以下内容

    # --------------------------------------- 
    # Module: console-capture
    # Redirects JVMs console stderr and stdout to a log file,
    # including output from Jetty's default StdErrLog logging.
    # --------------------------------------- 
    --module=console-capture
    
    ## Logging directory (relative to $jetty.base)
    jetty.console-capture.dir=logs
    
    ## Whether to append to existing file
    jetty.console-capture.append=true
    
    ## How many days to retain old log files
    jetty.console-capture.retainDays=30
    
    ## Timezone of the log timestamps
    jetty.console-capture.timezone=GMT
    

    编辑usr/share/jetty9生成resources目录下的jetty-logging.properties文件

    ## Force jetty logging implementation
    org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog
    
    ## Set logging levels from: ALL, DEBUG, INFO, WARN, OFF
    org.eclipse.jetty.LEVEL=WARN
    com.example.LEVEL=WARN
    
    ## Hide stacks traces in logs?
    com.example.STACKS=false
    
    ## Show the source file of a log location?
    com.example.SOURCE=true
    

    重启jetty9

    systemctl start jetty9
    

    部署应用

    将编译好的war包直接放在webapps目录下即可,一个war包就是一个应用,应用和应用之间是隔离的,比如hello.war表示hello这个应用

    访问方式:http://host/xxx

    xxx为war包名

  • 相关阅读:
    pycharm 使用pip3更新插件已经更新时报错
    剑指Offer系列之题11~题15
    剑指Offer系列之题1~题5
    个人hexo博客(静态,无后台)搭建
    设计模式之单例模式
    Hibernate实现limit语句效果
    Springboot项目中 前端展示本地图片
    eclipse报错:problems during content assist
    python中open与with open的区别
    修改Jenkins目录
  • 原文地址:https://www.cnblogs.com/xidongyu/p/12535376.html
Copyright © 2011-2022 走看看