Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

조회 수 696 댓글 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] CentOS Apache Httpd에 https 적용

    Date2014.03.05 CategorySystem/OS Byhooni Views4487
    Read More
  2. [linux] 쉘스크립트 expr

    Date2014.03.11 CategorySystem/OS Byhooni Views15630
    Read More
  3. [linux] awk 명령어

    Date2014.03.11 CategorySystem/OS Byhooni Views4961
    Read More
  4. [linux] split 명령어

    Date2014.03.11 CategorySystem/OS Byhooni Views4311
    Read More
  5. HTTPS와 SSL 인증서

    Date2014.03.11 CategorySystem/OS Byhooni Views7552
    Read More
  6. [mac] 맥OSX에서 NTFS 쓰기 기능 활성화

    Date2014.03.12 CategorySystem/OS Byhooni Views4292
    Read More
  7. [mac] 맥(OSX)에서 NTFS, 윈도우에서 HFS+ 사용하기

    Date2014.03.12 CategorySystem/OS Byhooni Views5123
    Read More
  8. [linux] CentOS 6.5 에서 "Bringing up interface eth0: Determining if ip address 121.78.127.197 is already in use for device eth0..."

    Date2014.04.05 CategorySystem/OS Byhooni Views4865
    Read More
  9. [linux] resolv.con 초기화 되는 문제

    Date2014.04.05 CategorySystem/OS Byhooni Views4627
    Read More
  10. [linux] yum 업데이트 시 커널 제외하기

    Date2014.09.11 CategorySystem/OS Byhooni Views1268
    Read More
  11. SVN(Subversion) 설치와 설정 (sasl 인증 적용 포함)

    Date2014.09.11 CategorySystem/OS Byhooni Views5684
    Read More
  12. [svn] SVN trunk 변경사항 되돌리기 (SVN Rollback)

    Date2014.11.27 CategorySystem/OS Byhooni Views1568
    Read More
Board Pagination Prev 1 ... 8 9 10 11 12 13 14 15 16 17 Next
/ 17