https 에서 www 있는 도메인을 없는 도메인으로 rewrite 또는 redirect 하기
Nginx 설정 입니다.
...
server {
listen 80;
server_name your-domain.com www.your-domain.com;
rewrite ^/(.*) https://your-domain.com/$1 permanent;
}
server {
listen 443 ssl;
server_name www.your-domain.com;
ssl_certificate conf.d/your-domain.com.crt.pem;
ssl_certificate_key conf.d/your-domain.com.key.pem;
ssl_trusted_certificate conf.d/your-domain.com.ca-chain-bundle.pem;
rewrite ^/(.*) https://your-domain.com/$1 permanent;
}
server {
listen 443 ssl;
server_name your-domain.com;
root /home/your-domain/www;
ssl_certificate conf.d/your-domain.com.crt.pem;
ssl_certificate_key conf.d/your-domain.com.key.pem;
ssl_trusted_certificate conf.d/your-domain.com.ca-chain-bundle.pem;
...
댓글 4개
==>
return 301 http://your-domain.com$request_uri;
https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#taxing-rewrites
알려 주셔서 감사합니다.
게시판 목록
개발자팁
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 5156 | PHP |
|
2년 전 | 972 | |
| 5155 | JavaScript |
|
2년 전 | 858 | |
| 5154 | PHP |
|
2년 전 | 1771 | |
| 5153 | 웹서버 |
|
2년 전 | 816 | |
| 5152 | PHP |
|
2년 전 | 1001 | |
| 5151 | PHP |
|
2년 전 | 859 | |
| 5150 | node.js | 2년 전 | 1292 | ||
| 5149 | OS | 2년 전 | 1526 | ||
| 5148 | 웹서버 | 2년 전 | 923 | ||
| 5147 | PHP | 2년 전 | 6904 | ||
| 5146 | JavaScript | 2년 전 | 1708 | ||
| 5145 | PHP | 2년 전 | 935 | ||
| 5144 | PHP | 2년 전 | 1416 | ||
| 5143 | JavaScript | 2년 전 | 821 | ||
| 5142 | PHP |
|
2년 전 | 912 | |
| 5141 | 웹서버 | 2년 전 | 2410 | ||
| 5140 | 기타 | 2년 전 | 1554 | ||
| 5139 | JavaScript | 2년 전 | 1198 | ||
| 5138 | PHP | 3년 전 | 1510 | ||
| 5137 | MySQL | 3년 전 | 1697 | ||
| 5136 | PHP | 3년 전 | 2000 | ||
| 5135 | PHP | 3년 전 | 1946 | ||
| 5134 | JavaScript |
오토소프트
|
3년 전 | 1100 | |
| 5133 | PHP |
|
3년 전 | 1134 | |
| 5132 | 웹서버 | 3년 전 | 1294 | ||
| 5131 | OS | 3년 전 | 1927 | ||
| 5130 | OS | 3년 전 | 1409 | ||
| 5129 | OS | 3년 전 | 1794 | ||
| 5128 | OS | 3년 전 | 1805 | ||
| 5127 | OS | 3년 전 | 923 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기