Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

Views 831 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
57 Develop [c++]현승이가 보내준 암호화 모듈 AES라인델.. file hooni 2003.04.23 10738
56 Develop [c++]현승이가 보내준 동영상 암호화 자료.. 볼것.. file hooni 2003.04.23 9754
55 Etc [htm] DOM에 대해 ㅎㅎ file hooni 2003.04.23 14750
54 System/OS [perl] 펄 환경 설정해야 할거 ㅋㅋ hooni 2003.04.23 15050
53 Develop [php] 니우쪽지다.. 받아라~ ^^ file hooni 2003.04.23 9867
52 Develop [c] 민수형 libipq 샘플 소스 ㅋㅋ hooni 2003.04.23 14137
51 System/OS 컴파일러 수업 자료(교재 : 컴파일러 입문) file hooni 2003.04.23 22064
50 System/OS asx미디어 정보 기록.. hooni 2003.04.23 20596
49 System/OS [linux] 쉘 스크립트에 대한 설명과 예제.. hooni 2003.04.23 13459
48 System/OS [linux] 쉘 스크립트 (Shell Script) hooni 2003.04.23 12112
47 System/OS [unix] 유닉스 csh에서 환경변수 등록 hooni 2003.04.23 11752
46 Develop [css] 스크롤바 안생기게 hooni 2003.04.23 9914
Board Pagination Prev 1 ... 89 90 91 92 93 94 95 96 97 98 Next
/ 98