nginx에서 certbot을 사용하는 경우 문제 발생
사실 웹앱 작업 중인데Reactjs
프런트 엔드 및Golang
를 지정합니다.이러한 2개의 프로그램은, 2개의 VM 상에서 개별적으로 호스트 되고 있습니다.Google-Compute-Engine
. 앱을 통해 서비스하고 싶다.https
그래서 저는 이 제품을Nginx
프런트엔드에 서비스를 제공하고 있습니다.먼저 설정 파일을 작성했습니다.Nginx
:
#version: nginx/1.14.0 (ubuntu)
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/banshee;
server_name XX.XXX.XX.XXX; #public IP of my frontend VM
index index.html;
location / {
try_files $uri /index.html =404;
}
}
이 부분에서는 모든 것이 예상대로 작동하지만, 그 이후에는 앱을 서비스하고 싶습니다.https
이 튜토리얼에 따라주세요.패키지를 설치했습니다.software-properties-common
,python-certbot-apache
그리고.certbot
근데 막상 해보니까
sudo cerbot --nginx certonly
다음 메시지가 나타납니다.
gdes@frontend:/etc/nginx$ sudo certbot --nginx certonly
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Could not choose appropriate plugin: The requested nginx plugin does not appear to be installed
The requested nginx plugin does not appear to be installed
구글과 여기서 몇 가지 검색을 해봤는데, 아직 어떤 플러그인이 없거나 다른 방법으로 해결할 수 있는지 알 수 없습니다.
누가 날 도와줄 아이디어 있어?
정말 감사합니다:)
서브도메인에 대해 certbot을 사용하여 인증서를 암호화하려고 했는데 다음과 같은 문제가 발생했습니다.명령어:
ubuntu@localhost:~$ certbot --nginx -d my_subdomain.website.com -d my_subdomain2.website.com
문제:
요청된 Nginx 플러그인이 설치되지 않은 것 같습니다.
솔루션:
Ubuntu 20 이상
ubuntu@localhost:~$sudo apt-get install python3-certbot-nginx
이전 버전
ubuntu@localhost:~$sudo apt-get install python-certbot-nginx
교환이 필요합니다.
apt install python-certbot-nginx
타고
apt install python3-certbot-nginx
다음 명령을 사용하여 Certbot nginx 플러그인을 설치할 수 있습니다.
add-apt-repository ppa:certbot/certbot
apt update
apt install python-certbot-nginx
Lets Encrypt의 certbot의 python3 버전을 다시 설치해야 합니다.
달려.
sudo apt-get install python3-certbot-nginx
데비안 10번지에서는certbot
PATH에서 "/usr/sbin"이 누락되었기 때문에 "사용 가능한 nginx 바이너리를 찾을 수 없습니다" 문제가 반환됩니다.PATH에 /usr/sbin 추가
export PATH=/usr/sbin:$PATH
그리고나서certbot
nginx의 증명서를 작성할 수 있습니다.
certbot --nginx -d <server name> --post-hook "/usr/sbin/service nginx restart"
letsencrypt의 debian wiki 페이지에서 설명한 바와 같이.
언급URL : https://stackoverflow.com/questions/53223914/issue-using-certbot-with-nginx
'it-source' 카테고리의 다른 글
Mobx - runInAction() 사용.그게 왜 필요하죠? (0) | 2023.04.01 |
---|---|
식을 '워치 해제'하는 방법 (0) | 2023.04.01 |
AngularJs 앱을 작성할 때 Jade 또는 핸들 바를 사용하는 이유는 무엇입니까? (0) | 2023.04.01 |
이네이블화 방법자동구성 스프링 주석 작업? (0) | 2023.04.01 |
JSON 문자열에서 BSON 개체를 만드는 중 (0) | 2023.04.01 |