공부
[nginx] HTTP 로 들어오면 강제로 HTTPS 로 전환하도록 설정하기(force redirect to SSL)
승가비
2024. 1. 14. 21:08
728x90
https://www.lesstif.com/system-admin/nginx-http-https-force-redirect-to-ssl-113344694.html
nginx HTTP 로 들어오면 강제로 HTTPS 로 전환하도록 설정하기(force redirect to SSL)
www.lesstif.com
server {
listen 80;
server_name example.com;
root html;
location / {
return 301 https://example.com$request_uri;
}
}
728x90