Django + MySQL ã§éçºããã¢ããªã±ã¼ã·ã§ã³ã®æ¬ç¨¼åç¨ã®ç°å¢ããAnsible ã使ã£ã¦ Amazon EC2 ä¸ã«æ§æãã¾ãã 以ä¸ã® 2ã¤ã®è¨äºã®ç¶ãã§ãä»åã§å®æã§ãã åã å: DjangoãAmazon Linux 2ã«Ansibleã§æ§æãããAurora (MySQL) ãCloudFormationã§UTF-8ã«æ§æãããããã¦æ¥ç¶ããã¾ã§ãå°å³ã«å¤§å¤ã ã£ãã㨠åå: Nginx + Gunicorn + Django + Aurora (MySQL) ã®æ§æãå³ã§èª¬æãã¦ã¿ã OS: Amazon Linux 2ï¼Amazon EC2ï¼ ã¢ããªã±ã¼ã·ã§ã³ãã¬ã¼ã ã¯ã¼ã¯: Django 2.2.6 ã¢ããªã±ã¼ã·ã§ã³ãµã¼ã: Gunicorn 19.9 Web ãµã¼ã: Nginx 1.12 (Amazon Extras) ãã¼ã¿ãã¼ã¹: Amazon Auro
ããã¿ã¤ãã«ããã¹ã¦ãªãã§ãããDjangoããããã¤ããéã®URLã®ãµããã¡ã¤ã³ã«ã¢ã³ãã¼ã¹ã³ã¢ã使ã£ã¦ããã¨ãããä¸è¨ã®ãããªã¨ã©ã¼ã§ãããã¾ãããã DisallowedHost at / Invalid HTTP_HOST header: 'hoge_foo.example.com'. The domain name provided is not valid according to RFC 1034/1035. ä¸è¨ãã¨ã©ã¼ã§æ¤ç´¢ãã㨠settings.pyã« ALLOWED_HOSTS=[ãã¡ã¤ã³] ã ALLOWED_HOSTS=['*'] ãè¨å®ããã°ãããã¨ããåçãå¤ãã§ã¾ãããã ãµããã¡ã¤ã³ã«ã¢ã³ãã¼ã¹ã³ã¢(_)ã使ã£ã¦ããå ´åã¯ALLOWED_HOSTSãæ£ããè¨å®ãã¦ãã¨ã©ã¼ã解æ¶ã§ãã¾ããã ãã®ãããhoge_foo.example.comã®å ´åãhog
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}