Skip to content

Instantly share code, notes, and snippets.

๐Ÿ› 
Busy
Design your Experience

LIM HYUN SEOK cr3ux53c

View GitHub Profile
@cr3ux53c
cr3ux53c / Windows์—์„œ Apache HTTPD์™€ Python django ์•ฑ์„ WSGI ๋ชจ๋“ˆ๋กœ ์—ฐ๋™.md
Last active Jan 31, 2019
Windows์—์„œ Apache HTTPD์™€ Python django ์•ฑ์„ WSGI ๋ชจ๋“ˆ๋กœ ์—ฐ๋™
View Windows์—์„œ Apache HTTPD์™€ Python django ์•ฑ์„ WSGI ๋ชจ๋“ˆ๋กœ ์—ฐ๋™.md

Apache Symbol

๊ฐœ์š”

Windows ๊ธฐ๋ฐ˜ Apache HTTPD ์„œ๋ฒ„๋ฅผ ์šด์˜ํ•˜๋˜ ์ค‘ django ์•ฑ์„ ์—ฐ๋™ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ฐพ๋‹ค๊ฐ€ ๋ช‡ ์‹ญ์‹œ๊ฐ„์˜ ์‚ฝ์งˆ ๋์— ์†”๋ฃจ์…˜์„ ์ฐพ์•„๋‚ด์–ด ๊ทธ ๋ฐฉ๋ฒ•์„ ์„œ์ˆ ํ•œ๋‹ค. ๋จผ์ € ๊ฐ€์žฅ ๋‹จ์ˆœํžˆ ์—ฐ๋™ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ django ๊ฐ€์ƒ์„œ๋ฒ„(./manage.py runserver)๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์„œ๋น„์Šค ์ œ๊ณต์„ ํ•˜๋˜, Apache์˜ ํ”„๋ก์‹œ ๋ชจ๋“ˆ์„ ์ด์šฉํ•ด์„œ HTTP ํ†ต์‹ ์„ ๊ฒฝ์œ ์‹œํ‚ค๋Š” ๊ฒƒ์ด๋‹ค. ํ•˜์ง€๋งŒ ์ฐธ์กฐ 1 ๋งํฌ์—์„œ๋„ ์„ค๋ช…ํ–ˆ๋“ฏ์ด ์ด๋Š” ์ •์  ๋ฐ์ดํ„ฐ ์ฒ˜๋ฆฌ๋ฅผ ์ „๋ฌธ์œผ๋กœ ํ•˜๋Š” Apache ์„œ๋ฒ„๊ฐ€ ์•„๋ฌด์ผ๋„ ์•ˆํ•œ ์ฑ„ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฒฝ์œ ์‹œํ‚ค๋ฏ€๋กœ ๋น„ํšจ์œจ์ ์ด๋‹ค. ๊ฒŒ๋‹ค๊ฐ€ django ๋‚ด์žฅ ์„œ๋ฒ„๋Š” ์„ฑ๋Šฅ์ด ์ƒ๋‹นํžˆ ๋‚˜์˜๋‹ค. django ๊ฐ€์ƒ์„œ๋ฒ„๋Š” ๋‹จ์ˆœํžˆ ๊ฐœ๋ฐœ ๋ฐ ๋””๋ฒ„๊น…์šฉ์œผ๋กœ๋งŒ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค. ์ด ๋ฌธ์„œ์—์„œ๋Š” WSGI ๋ชจ๋“ˆ์„ ๋‚ด์žฅ๋ชจ๋“œ(Embedded mode)๋กœ ๊ตฌ์„ฑํ•œ๋‹ค. Windows๋Š” UNIX ์Šคํƒ€์ผ์˜ fork() ์‹œ์Šคํ…œ ํ˜ธ์ถœ์„ ์ œ๊ณตํ•˜์ง€ ์•Š์œผ๋ฏ€๋กœ ํ•˜์œ„ ํ”„๋กœ์„ธ์Šค๊ฐ€ ๋ถ€๋ชจ ํ”„๋กœ์„ธ์Šค ๋ฉ”๋ชจ๋ฆฌ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์†ํ•˜๋Š” ํ”„๋กœ์„ธ์Šค ์ƒ์„ฑ์ด ๋ถˆ๊ฐ€๋Šฅํ•˜๋‹ค. ๊ทธ๋ž˜์„œ mod_wsgi ๋ชจ๋“ˆ์„ ๋‚ด์žฅ๋ชจ๋“œ/๋ฐ๋ชฌ๋ชจ๋“œ ์ค‘ ๋‚ด์žฅ๋ชจ๋“œ๋กœ๋งŒ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค. ๊ฒฐ๊ตญ django ์•ฑ์„ ์ˆ˜์ •ํ•˜๋ฉด Apache ์„œ๋ฒ„๋ฅผ ์žฌ์‹œ์ž‘ํ•ด์•ผํ•œ๋‹ค๋Š” ๋œป์ด๋‹ค.

๊ตฌ์„ฑํ™˜๊ฒฝ

@cr3ux53c
cr3ux53c / Letโ€™s Encrypt SSL ์™€์ผ๋“œ์นด๋“œ ์ธ์ฆ์„œ ๋ฐœ๊ธ‰.md
Last active Feb 24, 2019
Letโ€™s Encrypt SSL ์™€์ผ๋“œ์นด๋“œ ์ธ์ฆ์„œ ๋ฐœ๊ธ‰
View Letโ€™s Encrypt SSL ์™€์ผ๋“œ์นด๋“œ ์ธ์ฆ์„œ ๋ฐœ๊ธ‰.md


๊ตฌ์„ฑ ํ™˜๊ฒฝ

  • Virtual Machine (VMWare Workstation) โ€“ Ubuntu 18.04 LTS

๋ฐœ๊ธ‰ ๊ณผ์ •

  1. ์ €์žฅ์†Œ ์ถ”๊ฐ€ ๋ฐ ํŒจํ‚ค์ง€ ๋ชฉ๋ก ์—…๋ฐ์ดํŠธ
  • add-apt-repository ppa:certbot/certbot
  • apt update
You canโ€™t perform that action at this time.