System/OS
2022.02.03 04:20
[apache2] Redirect HTTP to HTTPS
Views 839 Comment 0
Attachment '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/
No. | Category | Subject | Author | Date | Views |
---|---|---|---|---|---|
105 | Develop | [ios] Objective-C 특정 문자 찾아 제거하기 | hooni | 2013.04.23 | 28104 |
104 | Develop | [ios] DJBros. (DJ요맨~) | hooni | 2013.04.23 | 28137 |
103 | Develop | [c] C로 구현한 CGI - 계산기 (링크리스트, 스택, 이진트리) | hooni | 2003.04.23 | 28155 |
102 | System/OS | [mysql] mysql user 생성시 ERROR 1364 | hooni | 2013.04.25 | 28614 |
101 | Develop | [c++] mfc 파일 한줄씩 읽기.. ㅋㅋ | hooni | 2013.04.23 | 28637 |
100 | Develop | [js] JSON 컨트롤.. 재귀호출로 값 출력하기 | hooni | 2013.04.23 | 28677 |
99 | Develop | [ios] NSMutableString 문자열 패턴 교환 | hooni | 2013.04.23 | 29024 |
98 | Develop | [ios] Objective-C 문자열 잘라서 배열(NSArray)에 넣기 | hooni | 2013.04.23 | 29453 |
97 | Develop | [ios] 소소한 팁 (Rect,Point,Path,URL 등) | hooni | 2013.08.08 | 29530 |
96 | System/OS | [mac] OSX(맥) 단축키 설명 ㅎㅎ | hooni | 2013.04.23 | 29668 |
95 | Develop | [ios] iCloud관련 저장 디렉토리 | hooni | 2013.04.23 | 29676 |
94 | Develop | [ios] 테이블뷰셀/뷰에 배경 패턴 넣기.. | hooni | 2013.04.23 | 29857 |