aws alb 리다이렉트 :: 에버노트

ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • aws alb 리다이렉트
    IT 2020. 3. 16. 16:19

    aws alb nginx 

    상황

    #포트 80->https:1443

    #포트 80 -> ssl 1443

    ---------------

    aws 설정

     

     

    conf.d/ssl.conf


    server {
            listen       80;
            server_name www.com; 
            client_max_body_size 5M;
            keepalive_timeout 10;
            #access_log off;
            #access_log  /var/log/nginx/www.com   main;
            error_log      /tmp/www.com  warn;


            location / {
     #               proxy_pass http://127.0.0.1:8301/;
      #              proxy_redirect http://127.0.0.1:8301/ http://$host;
                    proxy_set_header Host $host;
                    proxy_set_header        X-Real-IP       $remote_addr;
                    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                    proxy_set_header        X-Forwarded-Proto $scheme; 
            }

    }



    server {
            listen         1443 ssl;
            server_name www.com;

            #access_log  /var/log/nginx/www.com     main;
            error_log       /tmp/www.com     warn;

            ssl on;
            ssl_certificate /tmp/NGINX/www.com_crt.pem; 
            ssl_certificate_key /tmp/NGINX/www.com.pem;  
            ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
            ssl_ciphers         HIGH:!aNULL:!MD5;
            ssl_prefer_server_ciphers   on;
            ssl_dhparam                                     /etc/nginx/conf.d/dhparam.pem;
            ssl_ecdh_curve                          secp384r1;
            ssl_session_cache                       shared:SSL:30m;
            ssl_session_timeout                     30m;
            ssl_session_tickets                     off;
            ssl_stapling                            on;
            ssl_stapling_verify                     on;
            resolver                                        168.126.63.1 8.8.8.8 valid=300s;
            resolver_timeout                        5s;
            add_header                                      Strict-Transport-Security 'max-age=31536000; includeSubDomains';


            location / {
                    proxy_pass http://127.0.0.1:1443;
                      proxy_set_header Host $host;
                      proxy_set_header X-Real-IP $remote_addr;
                      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                      proxy_set_header X-Forwarded-Proto https;
            }

    }

    'IT' 카테고리의 다른 글

    4.4.2 Message submission rate for this client has exceeded the configured limit  (0) 2020.03.20
    PST Export Import  (0) 2020.03.19
    NTP 서버 확인  (0) 2020.03.14
    nginx ssl 설정 값  (0) 2020.03.12
    aws alb 설정 값  (0) 2020.03.12

    댓글

Designed by Tistory.