Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

조회 수 686 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
190 System/OS 맥에서 파일공유 (윈도우,맥) file hooni 2013.04.25 37303
189 System/OS [mac] Mac에서 Mac으로 원격제어하기 (맥에서 맥으로) file hooni 2013.10.08 36994
188 System/OS [sql] 조회구문(select)에서 중복 데이터를 한 번만 출력 (distinct) 1 hooni 2013.04.23 33926
187 System/OS [linux] Oracle8.1.6, Mysql+PHP+Zend Optimizer+APACHE+Tomcat(jsp,servlet)+IMAP+gd hooni 2003.04.23 32456
186 System/OS Mac OS X - Apache+PHP+MySQL 환경 서버 hooni 2013.04.25 31629
185 System/OS [mac] 맥에서 슬립(잠자기) 모드 진입을 막는 방법~ hooni 2013.10.10 30885
184 System/OS [linux] 특정 문자열 포함된 파일 찾는 명령어 hooni 2013.10.16 30615
183 System/OS [linux] 랜카드가 2개 일 때 네트워크 설정 hooni 2003.04.23 30022
182 System/OS 맥북에서 MAC/윈도우 멀티부팅시 시간 설정 file hooni 2013.04.23 29759
181 System/OS [mac] OSX(맥) 단축키 설명 ㅎㅎ file hooni 2013.04.23 29569
180 System/OS [mysql] mysql user 생성시 ERROR 1364 hooni 2013.04.25 28506
179 System/OS [sql] insert into select 사용하기 hooni 2013.04.23 27554
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17