nginx에서 http와 https를 동시에 사용하기 (https 사용 설정된 상태에서 http 접속 허용으로 수정) > 코딩 스토리

nginx에서 http와 https를 동시에 사용하기 (https 사용 설정된 상태에서 http 접속 허용으로 수정)

본문

 

sudo vi /etc/nginx/sites-available/default

 

에 들어갑니다.

 

##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;
SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
ssl 인증서 주소
ssl 인증서 주소
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
 ​

에서

 

server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
#listen 443 ssl default_server;

#listen [::]:443 ssl default_server; ​

 

부분을 수정합니다.(아래와 같이)

 

server {

listen 80 default_server;

#listen [::]:80 default_server;

# SSL configuration

#

listen 443 default_server ssl;

#listen [::]:443 ssl default_server;  

 

참고 링크:

좋아요112 이 글을 좋아요하셨습니다
url 복사 카카오톡 공유 라인 공유 페이스북 공유 트위터 공유

카테고리 분류 학습 시스템 (총 0개 학습됨)

예측 카테고리: IT-과학-기술 (랜덤 - 학습 데이터 없음)

이 분류가 맞나요? 학습시켜주세요!

2kat님의 댓글

no_profile 2kat쪽지보내기 자기소개 아이디로 검색 전체게시물 아이피 (000.♡.000.000) 작성일

?

😶
❤️
😂
😅
😮
😡
🥵
  • RSS
  • _  글쓰기 글쓰기
전체 302건
게시물 검색

접속자집계

오늘
2,133
어제
3,897
최대
42,418
전체
940,361