redirect all HTTP request to HTTPS on NGINX

NGINX 사용시
HTTP로 들어오는 모든 접속을 HTTPS 로 리다이렉트 시키려면…

1
2
3
4
5
server {
listen 80;
server_name jirak.net www.jirak.net;
return 301 https://$host$request_uri;
}

 

http://jirak.net/haha.html 로 접속시

https://jirak.net/haha.html 로 리다이렉트 됨….

 

About KENNETH 19694 Articles
지락문화예술공작단

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.