Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

조회 수 831 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
1125 System/OS [linux] 쉘 스크립트에 대한 설명과 예제.. hooni 2003.04.23 13459
1124 System/OS asx미디어 정보 기록.. hooni 2003.04.23 20596
1123 System/OS 컴파일러 수업 자료(교재 : 컴파일러 입문) file hooni 2003.04.23 22064
1122 Develop [c] 민수형 libipq 샘플 소스 ㅋㅋ hooni 2003.04.23 14137
1121 Develop [php] 니우쪽지다.. 받아라~ ^^ file hooni 2003.04.23 9867
1120 System/OS [perl] 펄 환경 설정해야 할거 ㅋㅋ hooni 2003.04.23 15048
1119 Etc [htm] DOM에 대해 ㅎㅎ file hooni 2003.04.23 14750
1118 Develop [c++]현승이가 보내준 동영상 암호화 자료.. 볼것.. file hooni 2003.04.23 9754
1117 Develop [c++]현승이가 보내준 암호화 모듈 AES라인델.. file hooni 2003.04.23 10738
1116 Develop [php] 배열 관련 함수 설명 ㅎㅎ hooni 2003.04.23 11778
1115 Develop [css] 화면 스크롤 제어 ㅋㅋ hooni 2003.04.23 8704
1114 Develop [js] 자바스크립트 이벤트 핸들.. hooni 2003.04.23 7940
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 98 Next
/ 98