Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- colaboratory
- 갱신이상
- 프로세스 메모리 영역
- 블로그
- 삽입이상
- 클라우드
- 글작성
- 동적세그먼트
- 카카오톡 이메일
- Colab
- 이진탐색트리
- Python
- 티스토리 블로그
- 다음 이메일
- 리버스 프록시
- 데이터 사전
- 플러그인 사용법
- 세그멘테이션
- 이전 발행 글 넣기
- 티스토리
- 에이쁠 기자단
- 에이블스쿨
- 카카오 이메일
- 코랩
- google colab
- 다음 계정
- 메모리캐시
- 삭제이상
- 정적세그먼트
- 포워드 프록시
Archives
- Today
- Total
imort 박뉴프
Nginx - 웹사이트 크롤링 거부 본문
1) 설정 파일
nginx.conf
server {
listen 80;
server_name hello.userinsight.co.kr;
location /robots.txt {
return 200 "User-agent: *\nDisallow: /";
}
location / {
proxy_pass http://localhost:0000/;
proxy_something...
}
}
2) 설정 파일
robot.txt
아래와 같은 컨피그를 nginx-app.conf에 넣고 도커화를 할때에, 적용만 해주면 된다.
location /robots.txt {
return 200 "User-agent: *\nDisallow: /";
}
팁으로 Django app 레벨에서, 해주는 경우도 있다. (파이서닉한 방법이다.)
from django.http import HttpResponseurl(r'^robots.txt', lambda x: HttpResponse("User-Agent: *\nDisallow: /", content_type="text/plain"), name="robots_txt")
🔍 블로그 https://parkmj236.tistory.com
🔍 Notion 이력서 https://parkmj236.notion.site/Park-Minji-e4fa8aa44b8c48b582a9082515dbc15e
🔍 Github https://github.com/Park-New-project/Projects
참고
'Develop > Error Correction' 카테고리의 다른 글
NodeJS MySQL [ER_NOT_SUPPORTED_AUTH_MODE] 오류 (0) | 2024.01.21 |
---|---|
HTTP 403 - HTTP 크롤링 오류 (0) | 2022.10.15 |
Comments