-
[Server] ssl ์ธ์ฆ์ ๋ฐ๊ธ ์ "Invalid response from http://example.com/.well-known/acme-challenge/Dv5e6y2HoKRKchN~~~: 403" ์ค๋ฅ ํด๊ฒฐ๐ปProgramming/Server 2024. 1. 24. 16:56
๋๊ฐ์ ๊ฒฝ์ฐ์๋ ์คํ๋ง๋ถํธ ํ๋ก์ ํธ ์์ nginx.conf ์ฝ๋๋ฅผ ์ง์ ์์ฑํด docker ์ปจํ ์ด๋๋ก ๋์ฐ๋ ๋ฐฉ๋ฒ์ผ๋ก nginx๋ฅผ ๋์ ๋๋ฐ,
์ด๋ฐ ์ค๋ฅ๊ฐ ๋ฐ์ํ์๊ณ , ์ ๋นจ๊ฐ ์ค ์ณ์ ธ์๋ ๊ณณ์์ ํํธ๋ฅผ ์ป์๋ค.
๊ทธ๋์ nginx.conf ํ์ผ์ ์์ ํด์คฌ๋๋ ๋ฐ๊ธ์ ์ฑ๊ณตํ์๋ค!!!
server { listen 80; server_name [๋๋ฉ์ธ]; access_log off; location / { proxy_pass http://server:8080; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
๊ณผ ๊ฐ์ด ์์ฑ๋์ด์๋ nginx.conf๋ฅผ
server { listen 80; server_name [๋๋ฉ์ธ]; access_log off; location /.well-known/acme-challenge/ { root /var/www/certbot; } location / { proxy_pass http://server:8080; proxy_set_header Host $host:$server_port; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }
์ ๊ฐ์ด ์์ ํด์ฃผ๋ ์ค๋ฅ๊ฐ ํด๊ฒฐ๋์๋ค!!!
ํ๋ง๋๋ก nginx์์ ssl์ธ์ฆ์ ์ํ certbot์ ๊ฒฝ๋ก๋ฅผ ์ถ๊ฐํด์ฃผ์ง ์์์ ๋ฐ์ํ ๋ฌธ์ ๊ฐ๋ค.
'๐ปProgramming > Server' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Server] ubuntu ์ด๊ธฐ root ๊ณ์ ์ผ๋ก ๋ก๊ทธ์ธ (0) 2024.01.21 [Server] ์ฟ ํค(Cookie) / ์ธ์ (Session) / ํ ํฐ(Token) ์ธ์ฆ ๋ฐฉ์์ด๋? (0) 2023.10.09 [Server] JWT๋? (0) 2023.10.02