Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

조회 수 705 댓글 0
Atachment
첨부 '1'
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

apache01.jpg




<VirtualHost *:80> 
  ServerName example.com
  ServerAlias www.example.com

  Redirect permanent / https://example.com/
</VirtualHost>

<VirtualHost *:443>
  ServerName example.com
  ServerAlias www.example.com

  Protocols h2 http/1.1

  # SSL Configuration

  # Other Apache Configuration

</VirtualHost>



<VirtualHost *:80> 
  ServerName example.com
  ServerAlias www.example.com

  Redirect permanent / https://example.com/
</VirtualHost>

<VirtualHost *:443>
  ServerName example.com
  ServerAlias www.example.com

  Protocols h2 http/1.1

  <If "%{HTTP_HOST} == 'www.example.com'">
    Redirect permanent / https://example.com/
  </If>

  # SSL Configuration

  # Other Apache Configuration

</VirtualHost>




[출처] https://linuxize.com/post/redirect-http-to-https-in-apache/





?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
190 System/OS [unix] 유닉스 csh에서 환경변수 등록 hooni 2003.04.23 11707
189 System/OS [linux] 쉘 스크립트 (Shell Script) hooni 2003.04.23 12068
188 System/OS [linux] 쉘 스크립트에 대한 설명과 예제.. hooni 2003.04.23 13416
187 System/OS asx미디어 정보 기록.. hooni 2003.04.23 20542
186 System/OS 컴파일러 수업 자료(교재 : 컴파일러 입문) file hooni 2003.04.23 21979
185 System/OS [perl] 펄 환경 설정해야 할거 ㅋㅋ hooni 2003.04.23 14996
184 System/OS [linux] vi 편집기 간단한 명령과 환경설정 hooni 2003.04.23 11362
183 System/OS [linux] 리눅스 활용 팁^^ hooni 2003.04.23 14634
182 System/OS [linux] 기본 명령어 (내공쌓기) hooni 2003.04.23 14335
181 System/OS [linux] 간단한 vi편집기 사용 명령 hooni 2003.04.23 13460
180 System/OS [linux] 프로그램 설치방법 (내공쌓기) hooni 2003.04.23 13435
179 System/OS [linux] 계정관리하기(내공쌓기) hooni 2003.04.23 13187
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17