Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

조회 수 695 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
70 System/OS [linux] 간단한 vi편집기 사용 명령 hooni 2003.04.23 13456
69 System/OS [linux] 간단한 NAT 설정 script hooni 2003.04.23 12608
68 System/OS [linux] 간단한 find 명령어 설명(업데이트 해야 함) hooni 2013.04.23 9111
67 System/OS [linux] yum 업데이트 시 커널 제외하기 hooni 2014.09.11 1267
66 System/OS [linux] X환경 GNOME에서 KDE로 바꾸는 법.. hooni 2013.04.23 12367
65 System/OS [linux] Xwindow/Xmanager 사용 hooni 2003.04.23 13344
64 System/OS [linux] wget 명령 사용 예제 hooni 2020.05.26 1451
63 System/OS [linux] vi 편집기 간단한 명령과 환경설정 hooni 2003.04.23 11360
62 System/OS [linux] The Ultimate Wget Download Guide With 15 Awesome Examples hooni 2020.05.26 813
61 System/OS [linux] ssh에서 원격 파일 전송하기.. hooni 2013.04.23 14161
60 System/OS [linux] SSH에 대한 기본 설명과 설치/설정 hooni 2013.04.23 10503
59 System/OS [linux] split 명령어 hooni 2014.03.11 4309
Board Pagination Prev 1 ... 7 8 9 10 11 12 13 14 15 16 17 Next
/ 17