gift-card-flea-market
Nginx 실행 에러 해결 (Failed to start A high performance web server and a reverse proxy server - Address family not supported by protocol)
無격
2023. 9. 29. 14:24
◈ 목차
- 문제 발생 과정
- 에러 로그 확인 -> 발생 에러 확인
- 원인
- 해결 방법
# 문제 발생 과정
Nginx 설치 후 실행 중..
Failed to start A high performance web server and a reverse proxy server
메시지와 함께 nginx 실행 실패
# 에러 로그 확인 -> 발생 에러 확인
1. error.log 파일 위치 확인
2. 에러 로그 확인
발생 에러 : nginx:[emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
# 원인
해당 우분투 서버는 IPv6 비활성화 상태이지만, nginx는 IPv6 address인 '[::]:80' 사용을 시도해 발생하는 에러입니다.
# 해결 방법
: Nginx 설정 파일에서 IPv6 비활성화
1. /etc/nginx/sites-enabled/default 편집기 실행
vim /etc/nginx/sites-enabled/default
2. 아래 부분 주석처리
listen [::]:80 default_server;
3. Nginx 재시작
service nginx restart
4. 확인
service nginx status
참고 :
https://techglimpse.com/nginx-error-address-family-solution/
Nginx Error: [::1]:80 failed: Address family not supported by protocol [Solved] - Techglimpse
This tutorial will provide a solution for the nginx error on address family not supported by protocol. Learn how to disable IPv6 support for Nginx.
techglimpse.com