Django ํ๋ก์ ํธ๋ฅผ uwsgi ํ๋กํ ์ฝ์ ์ฌ์ฉํด์ ๋ฐฐํฌ๋ฅผ ํ๊ณ , nginx์ ์ฐ๋ํ๋๋ staticfile๋ค์ ๊ฐ์ ธ์ฌ ์ ์์๋ค. (404) ์ด์ ๋ ๋ช ๊ฐ์ง๊ฐ ์๋๋ฐ.. 1. debug = False๋ก ๋ฐฐํฌํ๊ธฐ ๋๋ฌธ์ staticํ์ผ ๊ฒฝ๋ก๋ฅผ ์๋์ผ๋ก ๊ฐ์ ธ์ค์ง ์๋๋ค. 2. uwsgiํ๋กํ ์ฝ ์ฌ์ฉ์ runserver๊ฐ ์๋๊ธฐ ๋๋ฌธ์ static ํ์ผ ๊ฒฝ๋ก๋ฅผ ์๋์ผ๋ก ๊ฐ์ ธ์ค์ง ์๋๋ค. ํ
์คํธ ํ๋ฉด์ runserver๋ฅผ ํตํด ์๋ฒ๋ฅผ ๊ตฌ๋ํ๋ฉด static์ ์ ๊ฐ์ ธ์์ํ
๋ฐ, ์ค์ ๋ฐฐํฌํ๋๋ ๊ทธ๋ ์ง ์์๋ค. ๊ทธ๋์ nginx๋จ์์ ๊ฒฝ๋ก๋ฅผ ์ง์ ํ๊ณ ์ฒ๋ฆฌํ๋๋ก ํ๋ค. /etc/nginx/nginx.conf http { ... server { ... location /static { alias /home/ec2-u..
BackEnd/Django

ํ์ฐฝ ์ฅ๊ณ ๋ก ๊ฐ๋ฐ์ ํ๊ณ ๋๋ฉด runserver๋ก ํ
์คํธ๋ฅผ ํ์ง๋ง, ์ง์ ๋ฐฐํฌ๋ฅผ runserver๋ก ํ๊ฒ๋๋ฉด ๋ณด์, ์์ ์ฑ, ํจ์จ ๋ฑ ์ฌ๋ฌ ๋ฉด์์ ์ข์ง์๋ค.django.core.servers.basehttp """ HTTP server that implements the Python WSGI protocol (PEP 333, rev 1.21). Based on wsgiref.simple_server which is part of the standard library since 2.5. This is a simple server for use in testing or debugging Django apps. It hasn't been reviewed for security issues. DON'T USE I..