Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

조회 수 866 댓글 0
Atachment
첨부 '1'
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

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
번호 분류 제목 글쓴이 날짜 조회 수
70 System/OS [linux] apache, php, jsp 환경설정하기.. hooni 2003.04.23 15318
69 System/OS [linux] 특수문자 환경 설정(stty) hooni 2003.04.23 15352
68 System/OS [linux] 종료와 종료코드 확인(환경변수에서) hooni 2003.04.23 15626
67 System/OS [linux] 쉘스크립트 expr hooni 2014.03.11 15722
66 System/OS [router] 설정과 기본 명령어들 모음 hooni 2013.04.23 15757
65 System/OS 라우팅 경로 결정 영향 요소 ㅋㅋ file hooni 2013.04.23 15949
64 System/OS [owasp] 10대 웹어플리케이션 보안 취약 file hooni 2013.04.23 16001
63 System/OS [windows] 원격 데스크탑(터미널 서비스) 포트 변경 hooni 2013.04.23 16363
62 System/OS [linux] 패킷 스니퍼링 hooni 2003.04.23 16391
61 System/OS [linux] 콘솔/Xwindow 에서 PC스피커 소리 없애기 hooni 2003.04.23 16425
60 System/OS [linux] 메타(기호)문자의 의미와 사용 hooni 2003.04.23 16477
59 System/OS [linux] 네트워크 커널 설정.. hooni 2003.04.23 16558
Board Pagination Prev 1 ... 7 8 9 10 11 12 13 14 15 16 17 Next
/ 17