Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

Views 680 Comment 0
Atachment
Attachment '1'
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

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
No. Category Subject Author Date Views
34 System/OS [windows] 여러가지 활용 팁 hooni 2003.04.23 19969
33 System/OS [linux] 꿀통(honeyd) 설치하기.. 메뉴얼 과정 6 file hooni 2006.04.23 20219
32 System/OS asx미디어 정보 기록.. hooni 2003.04.23 20533
31 System/OS [doc] 코코아 프로그래밍 for MACOS 관련 내 분량.. file hooni 2013.04.23 20839
30 System/OS [windows] 윈도우 사용자 계정 로그인 암호 분실, 암호 변경하는 방법 file hooni 2015.07.09 21356
29 System/OS 컴파일러 수업 자료(교재 : 컴파일러 입문) file hooni 2003.04.23 21966
28 System/OS [mac] 맥(OSX)에서 root 패스워드 설정하기 hooni 2013.04.23 22418
27 System/OS [linux] 리눅스, 유닉스 CPU 이용률 확인.. hooni 2013.04.23 23782
26 System/OS [windows] 최근 열어본 문서목록 안나오게 하는 방법 hooni 2013.04.23 25477
25 System/OS [linux] 리눅스 파일시스템과 디렉토리 설명 hooni 2013.04.23 26877
24 System/OS [sql] insert into select 사용하기 hooni 2013.04.23 27554
23 System/OS [mysql] mysql user 생성시 ERROR 1364 hooni 2013.04.25 28504
Board Pagination Prev 1 ... 8 9 10 11 12 13 14 15 16 17 Next
/ 17