手动启动log4j|nginx实现http https共存

手动加载log4j.xml文件
DOMConfigurator.configure("src/main/resources/log4j.xml");

log4j.properties文件 
PropertyConfigurator.configure("src/main/resources/conf/log4j.properties");


nginx配置ssl证书实现https和http共存访问,无须实现跳转
server {  
            listen 80;  
            listen 443 ssl;  
            server_name zou.lu;  
            root /var/www/html;  
              
            #ssl on;   //这行必须要注释掉  
            ssl_certificate /usr/local/nginx/conf/zou_lu.crt;  
            ssl_certificate_key /usr/local/nginx/conf/zoulukey.pem;  
        }  

关注公众号,获取更多相关技能

成长的乐趣,在于分享!
大龄程序员,一路走来,感慨颇多。闲暇时写写字,希望能给同行人一点帮助。
本文版权归作者growithus和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
原文地址:https://www.cnblogs.com/growithus/p/11012228.html