Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

Views 870 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
333 Develop [c] 간단한 점 이동 샘플 소스코드 hooni 2013.04.23 6583
332 Develop [js] 새로고침(refresh)방법과 다른 페이지 바꾸기.. hooni 2003.04.23 6567
331 Develop [c] 민수형 소스(도메인소켓포함) file hooni 2013.04.23 6549
330 Develop [php] 정규표현식 간단히 정리 hooni 2013.04.23 6510
329 Develop [c] 네트워크 보안 프로그래밍 과제 (Server,Agent,Client) file hooni 2013.04.23 6497
328 Develop [js] 윤동이가 만든 영어 학습(?) 프로그램 file hooni 2013.04.23 6482
327 Develop [c] 메세지 프로그램 (Server - Agent - Client) file hooni 2013.04.23 6481
326 Develop [doc] C언어 문법 설명서 file hooni 2013.04.23 6473
325 Develop [java] 채팅창 처럼2.. swing.. file hooni 2013.04.23 6453
324 Etc 영어. 반드시 외워야 할 영어 숙어 2 file hooni 2016.07.07 6443
323 Develop [c] 다중연결 서버 만들기 #3 - poll() 사용 file hooni 2013.04.23 6371
322 Develop [js] 사진첩에 쓸 내용 - 마우스 오버로 바꾸기 hooni 2013.04.23 6365
Board Pagination Prev 1 ... 66 67 68 69 70 71 72 73 74 75 ... 98 Next
/ 98