2020년 3월 25일 보안정보 스크래핑

2020년 3월 25일 보안정보 스크래핑 3월 25일 보안정보 스크래핑 ==================================================================== + 주요 취약점 - 메일전송 프로토콜을 이용한 원격 명령어 실행 주의 권고 외 1건 1. 메일전송 프로토콜을 이용한 원격 명령어 실행 주의 권고 최근 OpenSMTPD* 취약점이 발견되는 등 메일전송 프로토콜에서 원격 명령어 실행이 가능하여 주의를 권고함 공격자는 취약점을 악용하여 피해를 발생시킬 수 있으므로, 해결방안을 참고하여 조치 필요 - https://www.krcert.or.kr/data/secNoticeView.do?bulletin_writing_sequence=35302 2. Django 제품 SQL Injection 취약점 보안 업데이트 권고 최근 Django*에서 SQL Injection취약점(CVE-2020-9402)을 악용할 수 있는 개념증명코드(Proof of concept, PoC)가 인터넷상에 공개되어 사용자의 보안 업데이트 필요 - https://www.krcert.or.kr/data/secNoticeView.do?bulletin_writing_sequence=35301 ==================================================================== + 취약점 - Apple Safari 취약점 1. Apple Safari 취약점 Apple Safari security bypass CVE-2020-3885 - https://exchange.xforce.ibmcloud.com/vulnerabilities/178339 Apple Safari security bypass CVE-2020-3887 - https://exchange.xforce.ibmcloud.com/vulnerabilities/178338 Apple Safari inform...

5. Django - Nginx 연동

5. Django - Nginx 연동

Python/Django

참고 : https://victorydntmd.tistory.com/257

Nginx 설치

# Nginx 설치 > vi /etc/yum.repos.d/nginx.repo # Insert this parhase [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/7/$basearch/ gpgcheck=0 enabled=1 # Firewall 설정 > yum install nginx > firewall-cmd --permanent --zone=public --add-service=http > firewall-cmd --permanent --zone=public --add-service=https > firewall-cmd --reload # Nginx 등록 및 시작 > systemctl enable nginx > systemctl start nginx http://아이피주소 로 접속확인 [Welcome to Nginx!]

uwsgi 설치

yum install -y gcc pip install uwsgi

uwsgi 설정 파일

# mkdir /etc/uwsgi/sites # /etc/uwsgi/sites/django.ini [uwsgi] project = django_sample username = nginx base = /home ### Django Settings # base directory # 프로젝트 경로 chdir = /home/django_sample/django_sample # python path # 가상 env python 폴더 혹은 서버 python home = /usr/local/bin/ # virtualenv path # 가상 env path #virtualenv = /home/django_sample/sampleenv # wsgi.py path # django 프로젝트 wsgi.py 경로 module = django_sample.wsgi:application master = true processes = 1 uid = nginx socket = /run/uwsgi/django.sock chown-socket = nginx:nginx chmod-socket = 660 vacuum = true #logto = /var/log/uwsgi/djangoTest.log logto = /home/django_sample.log

# vi /etc/systemd/system/uwsgi.service [Unit] Description=uWSGI service [Service] ExecStartPre=/bin/mkdir -p /run/uwsgi ExecStartPre=/bin/chown nginx:nginx /run/uwsgi ExecStart=/usr/local/bin/uwsgi --emperor /etc/uwsgi/sites Restart=always Type=notify NotifyAccess=all [Install] WantedBy=multi-user.target # systemctl daemon-reload

--emperor

uwsgi는 emperor 모드에서 실행할 수 있습니다.

이 모드에서는 uWSGI 설정 파일의 디렉토리를 감시하고 발견 한 각각에 대한 인스턴스를 생성하게 됩니다.

즉, emperor 모드를 통해 여러 응용 프로그램을 관리 할 수 있습니다.

# /etc/nginx/conf.d/default.conf server { listen 8000; server_name 192.168.1.229; #charset koi8-r; #access_log /var/log/nginx/host.access.log main; location / { #root /usr/share/nginx/html; #index index.html index.htm; include uwsgi_params; uwsgi_pass unix:/run/uwsgi/django.sock; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} }

# systemctl start uwsgi # systemctl enable uwsgi

from http://sanggi-jayg.tistory.com/56 by ccl(A) rewrite - 2020-03-06 20:20:38

댓글

이 블로그의 인기 게시물

엑스브레인(XBrain) 기업 정보

django 설치 방법

[aws] deploy Angular app with s3 | AWS S3로 angular 앱 배포하기