St991Cup's Blog

Steelcup, St991cup, steelcup


Nginx

  • Nginx Reverse Proxy 완벽 가이드

    Nginx를 사용하면 특정 도메인 경로를 로컬 포트로 연결할 수 있습니다. 예를 들어 http://yourdomain.com/api를 http://localhost:3000으로 연결하는 것이 가능합니다. Nginx 설치 # Ubuntu/Debiansudo apt updatesudo apt install nginx# CentOS/RHELsudo yum install nginx 기본 설정 /etc/nginx/sites-available/myapp 파일을 생성합니다: server { listen 80; server_name yourdomain.com; location /api { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header… Continue reading

  • 브라우저가 자동으로 반응하는 HTTP 상태 코드와 헤더들

    웹 개발을 하다 보면 HTTP 상태 코드를 자주 다루게 됩니다. 하지만 이 중 일부는 단순히 정보를 전달하는 것을 넘어서, 브라우저가 특정 동작을 자동으로 실행하도록 만듭니다. 예를 들어 301 Moved Permanently를 받으면 브라우저는 자동으로 새 주소로 이동하고, 401 Unauthorized를 받으면 로그인 팝업을 띄웁니다. 이런 “브라우저의 자동 동작”을 이해하면 더 효율적인 웹 애플리케이션을 만들 수 있습니다. 이… Continue reading

  • 과도한 트래픽으로 인한 요금 발생 방지 및 Nginx 트래픽 한도 초과 차단 방법

    1. Nginx에서 과도한 트래픽 방지 기본 설정 (1) 요청 속도 제한 http { limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s; server { location / { limit_req zone=one burst=20 nodelay; } }} (2) 동시 접속자 수 제한 http { limit_conn_zone $binary_remote_addr zone=addr:10m; server { location / { limit_conn addr 10; } }} (3) 업로드/다운로드 크기 제한 server { client_max_body_size… Continue reading

  • MediaWiki 슬래시 포함 제목 REST 404 에러 관련 해결 방법

    MediaWiki 슬래시 포함 제목 REST 404 에러 관련 해결 방법

    MediaWiki에서 슬래시가 들어간 제목의 문서에 접근할 때 "Error contacting the Parsoid/RESTBase server (HTTP 404)"오류와 함께 진입이 되지 않는 경우 해결방법에 대해 소개한다. 원인 Parsoid/RESTBase 서버는 페이지 정보를 슬래시로 구분한 URL로 요청을 받는다(예: POST /wiki/rest.php/localhost/v3/transform/html/to/wikitext/TestPage/12 HTTP/1.1" 200 521 “-” "VisualEditor-MediaWiki/1.38.2). 만약 페이지 제목의 슬래시가 그대로 들어갈 경우 문제가 발생한다. 제목이 파싱 과정에서 두 개의 데이터로 인식하기… Continue reading

  • Docker wordpress에 서브 도메인(A Record, with nginx + https) 적용

    Docker wordpress에 서브 도메인(A Record, with nginx + https) 적용

    직접 wordpress를 설치한 경우에는 구글링을 통해 검색되는 내용대로 진행하면 서브 도메인 설정을 할 수 있지만 Docker(https://hub.docker.com/_/wordpress)를 통해 wordpress를 셋업한 경우 ssl 적용이 제대로 되지 않아 새롭게 검색한 정보를 추려냄 참고한 사이트들 proxy 뒤에서 docker의 wordpress, https 적용 워드프레스 도커활용하여 배포하기 이 글에 ‘FS_METHOD’ 설정 관련 내용이 있는데 필요한지는 모르겠음 docker wordpress 구동 이전 포스팅 참고:… Continue reading

  • NGINX + Let’s Encrypt

    Let’s Encrypt에 방문해 도메인 인증서를 발급하기 위한 가이드를 보면 쉘 커맨드를 사용할 수 있을 경우 Certbot을 사용하는 방법을 가르쳐준다. nginx 설치 https://nginx.org/ 리눅스 버전은 apt를 이용해 설치한다. Nginx 공식 설치 매뉴얼 참고: 우분투 버전, 코드네임 확인: lsb_release -a 참고로 윈도우 버전은 별도의 윈도우 버전의 nginx를 이용해 사용할 수 있다. http://nginx.org/en/docs/windows.html nginx의 기능을 더 배우고 싶다면… Continue reading

  • NGINX Reverse Proxy 에센셜 설정

    NGINX Reverse Proxy 에센셜 설정

    server { listen 80; location / { proxy_pass http://127.0.0.1:3000; }} 위 스크린샷처럼 proxy_pass 외 다른 proxy 설정을 넣어주면 해당 프록시를 통해 접근할 곁들여진다는 느낌으로 기존 Request에 덧씌워져 적용된다. Continue reading

  • NGINX 설정 관리에 대해

    NGINX 설정 관리에 대해

    일단 NGINX 공식 사이트의 설정 관련 가이드를 보면 아래와 같다. Feature-Specific Configuration Files To make the configuration easier to maintain, we recommend that you split it into a set of feature‑specific files stored in the /etc/nginx/conf.d directory and use the include directive in the main nginx.conf file to reference the contents of the feature‑specific files. include conf.d/http;include conf.d/stream;include conf.d/exchange-enhanced; 굉장히 혼란스러운데,… Continue reading

워드프레스닷컴으로 이처럼 사이트 디자인
시작하기