Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
Tags
- linux
- 파일질라
- 국가IP차단
- SMTP설정
- centos7
- Apache
- CentOS
- DNS
- geoip
- https
- 리눅스서버
- 리눅스명령어
- 시스템관리
- SSL인증서
- 리눅스
- iptables
- 오블완
- ip차단
- 웹서버
- 서버보안
- postfix
- sftp
- FileZilla
- 서버방화벽
- ubuntu
- FTP
- 서버운영
- 서버관리
- 티스토리챌린지
- oops-firwall
Archives
- Today
- Total
운영중입니다
Certbot으로 무료 SSL 인증서 발급 및 설정하기 본문

CentOS7, Apache 기준
✅1. 패키지 설치
# 시스템 업데이트
sudo yum update -y
# EPEL 저장소 설치 (certbot이 EPEL에 있음)
sudo yum install epel-release -y
# certbot 및 Apache 플러그인 설치
sudo yum install certbot python3-certbot-apache -y
# *과거 yum install letsencrypt로 사용하였으며 현재도 certbot 설치 가능
✅2. 인증서 생성
# 2-1. Apache 서비스 중지 (standalone 사용 시)
sudo systemctl stop httpd
# 2-2. 인증서 발급
sudo certbot certonly --standalone -d example.com
# 인증 방식 선택: standalone 모드 사용
# 생성 완료 후 인증서 위치:
/etc/letsencrypt/live/example.com/
# cert.pem : 서버 인증서
# privkey.pem : 개인 키
# fullchain.pem : 인증서 + 체인
# chain.pem : 체인만

2-3. Apache 설정에 인증서 적용
# /etc/httpd/conf.d/example.com.conf 또는 사이트별 conf 파일에 다음 추가
<VirtualHost *:443>
DocumentRoot /경로
ServerName example.com
ServerAlias www.example.com
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
#로그 설정 추가
<Directory "/경로">
Options Indexes FollowSymLinks
Require all granted
AllowOverride All
</Directory>
</VirtualHost>
✅3. Apache 재시작
sudo systemctl start httpd
sudo systemctl status httpd

'리눅스보안' 카테고리의 다른 글
| 웹사이트 보안 강화: Apache mod_evasive 설치 및 차단 테스트 (0) | 2025.10.31 |
|---|---|
| 서버 접속시 메일로 알림받기 (0) | 2025.09.09 |
| geoip 설치 및 사용 방법2_2 (CentOS7) (2) | 2025.07.20 |
| geoip 설치 및 사용 방법2_1 (CentOS7) (2) | 2025.07.18 |
| geoip 설치 및 사용 방법 (CentOS5) (2) | 2025.07.12 |