티스토리 뷰

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

'공부' 카테고리의 다른 글

[tomcat] war  (0) 2024.01.14
[Spring] OpenFeign - 에러 코드 분기 처리 (ErrorDecoder)  (0) 2024.01.14
[Let’s Encrypt]  (0) 2024.01.09
[nginx]  (1) 2024.01.09
[linux] CentOS export TMOUT=86400  (0) 2024.01.06
댓글