Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

Views 695 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
1173 Develop [vb] 비주얼 베이직 자격증용 ㅎㅎ hooni 2003.04.23 61420
1172 Develop [vb] 비주얼 베이직 131페이지 hooni 2003.04.23 58046
1171 Develop [vb] 비주얼 베이직 141페이지 hooni 2003.04.23 58909
1170 Develop [vb] 비주얼 베이직 173페이지 hooni 2003.04.23 54805
1169 Develop [vb] 비주얼 베이직 205페이지 hooni 2003.04.23 56040
1168 Develop [vb] 비주얼 베이직 순위 정렬 루틴 hooni 2003.04.23 58319
1167 Develop [vb] 비쥬얼 베이직 기출 문제 연습 hooni 2003.04.23 55136
1166 Develop [vb] 비쥬얼 베이직 기출 문제 연습2 hooni 2003.04.23 54341
1165 Etc [세미나] XML 레포트.. hooni 2003.04.23 19705
1164 Develop [c] 재미있는 코딩.. file hooni 2003.04.23 21318
1163 Develop [vb] 비쥬얼 베이직으로.. hooni 2003.04.23 53004
1162 Database [mysql] 접속과 테이블 생성 간단한 설명.. hooni 2003.04.23 18657
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 98 Next
/ 98