System/OS
2022.02.03 04:20
[apache2] Redirect HTTP to HTTPS
조회 수 691 댓글 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/
-
[linux] 간단한 vi편집기 사용 명령
-
[linux] 간단한 NAT 설정 script
-
[linux] 간단한 find 명령어 설명(업데이트 해야 함)
-
[linux] yum 업데이트 시 커널 제외하기
-
[linux] X환경 GNOME에서 KDE로 바꾸는 법..
-
[linux] Xwindow/Xmanager 사용
-
[linux] wget 명령 사용 예제
-
[linux] vi 편집기 간단한 명령과 환경설정
-
[linux] The Ultimate Wget Download Guide With 15 Awesome Examples
-
[linux] ssh에서 원격 파일 전송하기..
-
[linux] SSH에 대한 기본 설명과 설치/설정
-
[linux] split 명령어