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

nginx_tomcat

时间:2018-04-24 13:56:54      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:orm   sock   rip   nginx   serve   permanent   org   ssi   bytes   

log_format      weparts ‘$remote_addr [$time_iso8601] $request - $status "$http_user_agent" $body_bytes_sent $request_time‘;

server {
    listen       80;
    server_name  192.168.1.240 weparts.org *.weparts.org;
    rewrite ^(.*)$ https://www.weparts.org$1 permanent;
}

server {
    listen       443 ssl;
    server_name  www.weparts.org;

    ssl_protocols             TLSv1.2;
    ssl_ciphers               EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;
    ssl_prefer_server_ciphers on;
    ssl_certificate           cert/www.weparts.org.crt;
    ssl_certificate_key       cert/www.weparts.org.key;
    ssl_session_cache         shared:SSL:5m;
    ssl_session_timeout       10m;


    charset      utf-8;
    access_log   /var/log/nginx/weparts.access.log weparts;
    gzip         on;
    gzip_types   application/x-javascript text/css application/json;

    location / {
        proxy_pass              http://127.0.0.1:8180;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        Host $http_host;
        proxy_redirect          http:// https://;
    }

    location /webSocketServer {
        proxy_pass              http://127.0.0.1:8180;
        proxy_http_version      1.1;
        proxy_set_header        Upgrade $http_upgrade;
        proxy_set_header        Connection "upgrade";
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        Host $http_host;
        proxy_redirect          off;
    }

    location /resources/ {
        root   /var/lib/tomcats/weparts/webapps/ROOT;
    }

    location /nginx {
        stub_status     on;
        access_log      off;
    }
}

nginx_tomcat

标签:orm   sock   rip   nginx   serve   permanent   org   ssi   bytes   

原文地址:https://www.cnblogs.com/fengjunjie-w/p/8929034.html

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