https 에서 www 있는 도메인을 없는 도메인으로 rewrite 또는 redirect 하기
-
같은아람
- 0건
- 159회
- 21-03-11 16:53
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;
...
등록된 댓글이 없습니다.