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
21 Develop [c] 소수점 반올림^^ hooni 2003.04.23 8478
20 Develop [c] 최대공약수 알고리즘 (유클릿) hooni 2003.04.23 8873
19 Develop [php] whois정보 조회 프로그램 hooni 2003.04.23 11733
18 Develop [c] 간단한 링크드 리스트(linked list) 자료형 예제.. hooni 2003.04.23 9839
17 Develop [c] CGI Library to C^^ hooni 2003.04.23 8422
16 Develop [c] scanf(), printf() 포맷의 형변환 hooni 2003.04.23 10856
15 Develop [c] home env stack overflow hooni 2003.04.23 11515
14 Develop [c] 파일입출력 간단한 설명 hooni 2003.04.23 11243
13 Develop [C] C언어의 조건 연산자(Conditional Operator) hooni 2003.04.23 14227
12 Database [mysql] 접속과 테이블 생성 간단한 설명.. hooni 2003.04.23 18655
11 Develop [vb] 비쥬얼 베이직으로.. hooni 2003.04.23 52997
10 Develop [c] 재미있는 코딩.. file hooni 2003.04.23 21316
Board Pagination Prev 1 ... 89 90 91 92 93 94 95 96 97 98 Next
/ 98