System/OS
2022.02.03 04:20
[apache2] Redirect HTTP to HTTPS
조회 수 696 댓글 0
첨부 '1' |
|
---|
<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/
-
[c] 간단한 점 이동 샘플 소스코드
-
[c] 민수형 소스(도메인소켓포함)
-
[js] 새로고침(refresh)방법과 다른 페이지 바꾸기..
-
[c] 네트워크 보안 프로그래밍 과제 (Server,Agent,Client)
-
[js] 윤동이가 만든 영어 학습(?) 프로그램
-
[c] 메세지 프로그램 (Server - Agent - Client)
-
[php] 정규표현식 간단히 정리
-
[doc] C언어 문법 설명서
-
[java] 채팅창 처럼2.. swing..
-
영어. 반드시 외워야 할 영어 숙어
-
[c] 다중연결 서버 만들기 #3 - poll() 사용
-
[js] 사진첩에 쓸 내용 - 마우스 오버로 바꾸기