Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

Views 829 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 System/OS [ms-sql] 서브스트링(substring), 프로시저(SP) 작성 예제 hooni 2013.04.23 41381
56 Etc [용어] POC, Pilot, BMT에 대한 IT 업계에서 통용되는 의미 hooni 2014.01.02 42037
55 System/OS [linux] 네트웍 트래픽 모니터링(MRTG) hooni 2003.04.23 42246
54 Develop [java] 스트러츠(Struts) 세팅 ㅋㅋ file hooni 2013.04.23 42390
53 Develop [ios] 미스터피자(Mr.pizza) 어플 file hooni 2013.04.23 42672
52 Develop [c++] BHO 프로그램 동작 원리.. 간단하게.. hooni 2013.04.23 43137
51 Develop [android] 화면 전환(가로/세로)시 설정 hooni 2013.04.23 43418
50 Develop [android] ListView+ArrayAdapter 테스트 hooni 2013.04.23 43945
49 Etc 스파이웨어(BHO) 탐지하는 방법.. hooni 2013.04.23 44459
48 Develop [android] ArrayAdapter 테스트 파일 ㅎㅎ hooni 2013.04.23 45289
47 Develop [ios] 배열(NSArray) 연산과 간단한 애니메이션(split images) hooni 2013.10.31 45505
46 Develop [ios] UIAlertView 초간단 샘플 ㅎㅎ hooni 2013.10.14 46179
Board Pagination Prev 1 ... 89 90 91 92 93 94 95 96 97 98 Next
/ 98