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
1077 Develop [android] 간단한 SQLIite 예제 hooni 2017.06.14 1322
1076 Develop 캘리포니아 운전면허 족보 file hooni 2017.06.12 734
1075 Develop 사이버보안실무 발표자료 (2017.06.08) file hooni 2017.06.05 1201
1074 System/OS [windows] 윈도우즈 콘솔에서 정품인증 하는 방법 hooni 2017.05.24 5308
1073 Develop 리팩토링 계획안 file hooni 2017.05.15 746
1072 Develop [ios] 코코아 프로그래밍의 네이밍 룰(명명 규칙) hooni 2017.05.11 1179
1071 Etc 사이버보안실무 시험. secret hooni 2017.04.20 0
1070 Develop [ios] Facebook SDK 로그인 설명 file hooni 2017.04.19 1156
1069 Develop [ios] NSString, RegularExpression Find/Replace hooni 2017.04.14 834
1068 Develop [ios] 비디오,네트워크,소셜로그인 테스트 file hooni 2017.04.04 684
1067 Etc 사이버보안실무 수업 메모 hooni 2017.03.30 807
1066 Database [mysql] 쿼리 실행시 ERROR 1366 (HY000) : incorrect string value : for column 3 hooni 2017.03.30 8779
Board Pagination Prev 1 ... 4 5 6 7 8 9 10 11 12 13 ... 98 Next
/ 98