메모용으로 간단히 작성되었습니다.
1. CloudFlare에 Add Site
2. SSL/TLS > Full(Strict)로 설정

3. Origin Server탭에 들어가서 Create Certificates
4. 만들어진 PEM키를 서버에 저장. (orifianl certificate와 private key 둘 다 있음)
5. nginx config 수정
server { listen 80; listen [::]:80; server_name your.domain; access_log /var/log/nginx/railotaku-access.log; error_log /var/log/nginx/railotaku-error.log; location / { return 301 https://$server_name$request_uri; } } server { listen 443 ssl; server_name your.domain; ssl_certificate /path/to/origin_cert.pem; ssl_certificate_key /path/to/prvate_key.pem; location / { proxy_set_header Host $http_host; proxy_pass http://127.0.0.1:8880/; proxy_set_header X-Nginx-Proxy true; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
'프로그래밍 > General' 카테고리의 다른 글
Artillery를 이용한 쉬운 부하 테스트(stress test) (1) | 2022.07.11 |
---|---|
SCP로 두 컴퓨터간 파일 옮기기 (Windows open ssh 설정) (0) | 2022.07.10 |
[해결] Could not open a connection to your authentication agent (0) | 2022.06.17 |
Youtube 자동완성 연관 검색어를 가져오는 방법 (0) | 2022.06.11 |
Git의 기본 에디터 변경하기 (0) | 2022.06.11 |