nginx + tomcat + ssl + redirect

memo

nginx.conf

worker_processes  1;
events {
    worker_connections  1024;
}
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    client_max_body_size 2000m;
    server {
        listen       80 default_server;
        listen       [::]:80 default_server;
        return  301 https://dspace.laccie.blogspot.com$request_uri;

        server_name  dspace.laccie.blogspot.com;
        access_log   /var/log/dspace.laccie.blogspot.com/access.log;
        error_log    /var/log/dspace.laccie.blogspot.com/error.log;
        root         /var/www/html/;
    }

    upstream xmlui {
        ip_hash;
        server localhost:8080;
    }

    server {

        listen       443 ssl;
        ssl on;

        ssl_certificate         /etc/letsencrypt/live/dspace.laccie.blogspot.com/cert.pem;
        ssl_certificate_key     /etc/letsencrypt/live/dspace.laccie.blogspot.com/privkey.pem;

        ssl_session_tickets off;

        server_name  dspace.laccie.blogspot.com;
        access_log   /var/log/dspace.laccie.blogspot.com/ssl-access.log;
        error_log    /var/log/dspace.laccie.blogspot.com/ssl-error.log;
        root         /var/www/html/;

        location / {
                proxy_set_header X-Forwarded-Host $host;
                proxy_set_header X-Forwarded-Server $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Cookie $http_cookie;

                proxy_http_version 1.1;

                proxy_pass http://xmlui;
                proxy_redirect  http://xmlui /;
                proxy_cookie_path  http:// https://;

                proxy_buffering off;
                proxy_store     off;

                proxy_connect_timeout 120;
                proxy_send_timeout    120;
                proxy_read_timeout    120;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }



>Nginxポケットリファレンス [ 鶴長鎮一 ]

価格:3,002円
(2017/2/21 22:32時点)
感想(0件)

コメント

ドメインサーチ

https://www.makko.biz/whois/?q=bg.bahaiquotesillustrated.info

このブログの人気の投稿

Apacheプロセス増加について

wgetでsitemap作成

ApacheでSSL自己証明書作成(オレオレ証明書)