250x250
반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- html
- crontab
- Apache
- Certbot
- non-www
- mysql
- Mac
- vscode
- child theme
- git pull
- launch.json
- front page
- home page
- Liniux
- Fail2ban
- root
- wordpress
- LetsEncrypt
- MariaDB
- Linux
- php
- https
- DOM Parser
- new user
- Google Cloud
- SSL
- 구글 클라우드
- CentOS7
- Xdebug
- centos
Archives
- Today
- Total
between 0 and 1
[Apache] Redirect HTTP -> HTTPS and Remove "www" 본문
Software Development Engineering/Dev.Info.
[Apache] Redirect HTTP -> HTTPS and Remove "www"
devxpert.yoon 2021. 1. 3. 18:46728x90
반응형
httpd-vhosts.conf
<VirtualHost *:80>
ServerName localhost
ServerAlias www.localhost
Redirect permanent / https://localhost
</VirtualHost>
<VirtualHost *:443>
DocumentRoot "/Users/devxpert/Dev/webroot"
ServerName localhost
ServerAlias www.localhost
Protocols h2 http/1.1
<If "%{HTTP_HOST} == 'www.localhost'">
Redirect permanent / https://localhost
</If>
SSLEngine on
SSLCertificateFile "/Users/devxpert/Dev/webroot/ssl/localhost.crt"
SSLCertificateKeyFile "/Users/devxpert/Dev/webroot/ssl/localhost.key"
</VirtualHost>
Remove "www" in url
<If "%{HTTP_HOST} == 'www.localhost'">
Redirect permanent / https://localhost
</If>
728x90
반응형
'Software Development Engineering > Dev.Info.' 카테고리의 다른 글
[Git] Adding an existing project to GitHub (기존 프로젝트 깃허브에 올리기) (0) | 2021.01.26 |
---|---|
[VSCode] git pull - There is no tracking information for the current branch (0) | 2021.01.24 |
[Server] SSL for Localhost (Local Development Environment) (0) | 2021.01.03 |
운영체제별 데몬 시작/중지/등록 명령어 (daemon command for each os) (0) | 2021.01.03 |
유튜브(Youtube) 썸네일 주소 (0) | 2019.04.12 |