사용자 도구

사이트 도구


nginx:rewrite

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
nginx:rewrite [2013/01/23 18:07]
kwon37xi
nginx:rewrite [2019/01/08 16:42] (현재)
kwon37xi
줄 24: 줄 24:
 </code> </code>
  
-===== http로 온 것을 https로 =====+===== http로 온 것을 모두 https로 =====
   * [[http://serverfault.com/questions/67316/in-nginx-how-can-i-rewrite-all-http-requests-to-https-while-maintaining-sub-dom|redirect - In Nginx, how can I rewrite all http requests to https while maintaining sub-domain?]]   * [[http://serverfault.com/questions/67316/in-nginx-how-can-i-rewrite-all-http-requests-to-https-while-maintaining-sub-dom|redirect - In Nginx, how can I rewrite all http requests to https while maintaining sub-domain?]]
   * 예제<code>   * 예제<code>
 server { server {
     listen 80;     listen 80;
 +    server_name    my.domain.com;
     rewrite ^(.*) https://$host$1 permanent;     rewrite ^(.*) https://$host$1 permanent;
 } }
줄 34: 줄 35:
 server { server {
     listen 443;     listen 443;
 +    server_name    my.domain.com;
     # .....     # .....
 } }
 </code> </code>
 +
 +===== 참고 =====
 +  * [[https://www.cyberciti.biz/faq/linux-unix-nginx-redirect-all-http-to-https/|How To Nginx Redirect All HTTP Request To HTTPS Rewrite 301 Rules - nixCraft]]
 +
  
nginx/rewrite.1358932042.txt.gz · 마지막으로 수정됨: 2013/01/23 18:07 저자 kwon37xi