手动启动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;  
        }  

 

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

posted @ 2017-03-17 18:30  maventalker  阅读(183)  评论(0编辑  收藏  举报