Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

조회 수 691 댓글 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/





?

  1. [linux] 간단한 vi편집기 사용 명령

  2. [linux] 간단한 NAT 설정 script

  3. [linux] 간단한 find 명령어 설명(업데이트 해야 함)

  4. [linux] yum 업데이트 시 커널 제외하기

  5. [linux] X환경 GNOME에서 KDE로 바꾸는 법..

  6. [linux] Xwindow/Xmanager 사용

  7. [linux] wget 명령 사용 예제

  8. [linux] vi 편집기 간단한 명령과 환경설정

  9. [linux] The Ultimate Wget Download Guide With 15 Awesome Examples

  10. [linux] ssh에서 원격 파일 전송하기..

  11. [linux] SSH에 대한 기본 설명과 설치/설정

  12. [linux] split 명령어

Board Pagination Prev 1 ... 7 8 9 10 11 12 13 14 15 16 17 Next
/ 17