Contents

System/OS
2022.02.03 04:20

[apache2] Redirect HTTP to HTTPS

Views 829 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/





?

  1. Mac OS X - Apache+PHP+MySQL 환경 서버

    Date2013.04.25 CategorySystem/OS Byhooni Views31709
    Read More
  2. Mac에서 Node.js 설치하기

    Date2018.09.28 CategorySystem/OS Byhooni Views4320
    Read More
  3. NAT와 DHCP에 대한 간단한 설명

    Date2013.04.23 CategorySystem/OS Byhooni Views18393
    Read More
  4. OpenSSL로 ROOT CA 생성 및 SSL 인증서 발급하기

    Date2017.10.28 CategorySystem/OS Byhooni Views1623
    Read More
  5. OSI (Open Systems Interconnection) 개방형 시스템간 상호 접속

    Date2013.04.23 CategorySystem/OS Byhooni Views10836
    Read More
  6. php.ini 설정 안됐을때.. ㅋㅋ

    Date2013.04.23 CategorySystem/OS Byhooni Views11693
    Read More
  7. RPA란? 어디에 어떻게 쓰이고 누가 만드나?

    Date2020.01.28 CategorySystem/OS Byhooni Views1500
    Read More
  8. SSH Passwordless Login Using SSH Keygen in 5 Easy Steps

    Date2019.11.22 CategorySystem/OS Byhooni Views1527
    Read More
  9. SVN(Subversion) 설치와 설정 (sasl 인증 적용 포함)

    Date2014.09.11 CategorySystem/OS Byhooni Views5822
    Read More
  10. [android] 초간단 HTTP, POST 전송 샘플

    Date2017.02.16 CategorySystem/OS Byhooni Views3625
    Read More
  11. [apache2] Redirect HTTP to HTTPS

    Date2022.02.03 CategorySystem/OS Byhooni Views829
    Read More
  12. [bios] 시스템 부팅 도중 발생하는 비프음

    Date2003.04.23 CategorySystem/OS Byhooni Views18229
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 17 Next
/ 17