EC2ã«ã¦yumã§ã¤ã³ã¹ãã¼ã«ããhttpdã§ã¯ãmod_rewriteãæå¹ã«ãªãã¾ããã åå ã¯httpd.confã®AllowOverrideãNoneã«è¨å®ããã¦ããããã§ããã å¤æ´åï¼ <Directory "/var/www/html"> AllowOverride None </Directory> å¤æ´å¾ï¼ <Directory "/var/www/html"> AllowOverride All </Directory>
SPFï¼ã»ã³ãã¼ã»ããªã·ã¼ã»ãã¬ã¼ã ã¯ã¼ã¯ï¼ã¯ãéä¿¡å ã®ã¡ã¼ã«ã¢ãã¬ã¹ãè©ç§°ããã¦ããªããã®æ£å½æ§ãæ¤è¨¼ããä»çµã¿ã§ããã¡ã¼ã«ãµã¼ããæ§ç¯ããã«ããã£ã¦ã Amazon Route 53 ã« SPFã¬ã³ã¼ããç»é²ãã¾ããã SPFã®ä»çµã¿SPFã®ä»çµã¿ã¨ãã¦ã¯ãDNSãµã¼ãã«æ£è¦ã®ã¡ã¼ã«ãµã¼ãã®IPã¢ãã¬ã¹ãç»é²ãã¦ããï¼ãããSPFã¬ã³ã¼ãã¨ããã¾ãï¼ã¡ã¼ã«ãåãåã£ãã¡ã¼ã«ãµã¼ãã¯ãã®SPFã¬ã³ã¼ããåç §ããéä¿¡å ã®ã¡ã¼ã«ã¢ãã¬ã¹ãè©ç§°ããã¦ããªããã¨ã確èªãã¾ãã ä¸ã®å³ã§ã¯ãSPFã¬ã³ã¼ãã«ç»é²ããã¦ããæ£è¦ã®ã¡ã¼ã«ãµã¼ãããéä¿¡ãããã¡ã¼ã«ï¼MAIL FROMï¼[email protected]ï¼ã¯èªè¨¼OKã«ãªãã¾ãããSPFã¬ã³ã¼ãã«ç»é²ããªãè¿·æã¡ã¼ã«éä¿¡è ã®ã¡ã¼ã«ãµã¼ãããéä¿¡ãããã¡ã¼ã«ã¯èªè¨¼NGã¨ãªãã¾ãã åèè³æï¼SPFï¼Sender Policy Frameworkï¼
EC2ãµã¼ãä¸ã®Apacheã§ãã¼ãã£ã«ãã¹ããå©ç¨ãè¤æ°ãã¡ã¤ã³ãéç¨ããæ¹æ³ã§ãã æ°ãããã¡ã¤ã³åã追å ããè¨å® httd.confã®æå¾ãããã«ã以ä¸ã®è¡ã追å ãã¦ãã ããã NameVirtualHost *:80 <VirtualHost *:80> ServerName olddomain.com # ä»ã¾ã§ä½¿ã£ã¦ãããã¡ã¤ã³ DocumentRoot "/var/www/html" # å ¬éãã¦ãããã£ã¬ã¯ã㪠</VirtualHost> <VirtualHost *:80> ServerName newdomain.com # æ°ãããã¡ã¤ã³ DocumentRoot "/var/www/html" # æ°ãããã¡ã¤ã³ã®å ¬éããããã£ã¬ã¯ã㪠</VirtualHost> â»ã*ãã使ã£ã¦IPã¢ãã¬ã¹ãæå®ãã¦ããã®ããã¤ã³ãã§ããEC2ã®Public IPã¢ãã¬ã¹ãè¨
AWSä¸ã§ãªããmb_strimwidthãèªã¿è¾¼ãã æç¹ããåããªãã ãªãã§ã ãªãã§ã ãã¨æã£ã¦ããAWSã§ã¯ããã©ã«ãã§PHPã® ãã«ããã¤ãé¢æ°ããã¾ãåããªãã£ãã¨ãã話ã æ¥æ¬å½å ã¯åé¡ãªããã§ãããæµ·å¤ç³»ã®ãµã¼ãã¯ããããç°å¢ãå¤ãã¿ããã ã¨ããããã§ããããªç¶æ ã®æã®å¯¾å¦æ¹æ³ãè¦æ¸ã php-mbstringãã¤ã³ã¹ãã¼ã« å®ã¯å¯¾å¦æ¹æ³ã¯ç°¡åã§mbstringãã¤ã³ã¹ãã¼ã«ããã ãã # yum install php-mbstring # /etc/init.d/httpd restart ã¨ãããããããã§ãã£ããmb_strimwidthãåãã¾ããã ãã®ä»ããã«ããã¤ãé¢é£ã®é¢æ°ãåãããã«ãªã£ã¦ã¾ãã ãã¨ã¯ãã³ã¬ã«ä¼´ãè¨å®ã確èªãã¦ããã¾ãã php.iniã®è¨å®ã確èªï¼ä¿®æ£ mbstringãã¤ã³ã¹ãã¼ã«ãã¦mb_strimwidthã使ã£ã¦ã¿ã¦ãã¾ããã
ãAmazon ECï¼ã®ç«ã¡ä¸ãå¾ã«è¨å®ãããã¨ï¼ããã話ããåã«ãå°ãã ãæ°ããã¤ã³ã¹ã¿ã³ã¹ããç´¹ä»ãã¾ãï¼ï¼ 以åã®è¨äºã§æ°ãã«è¿½å ãããAmazon EC2ã®ã¤ã³ã¹ã¿ã³ã¹ãã¡ããªã¼ãç´¹ä»ãããã¨æãã¾ãããããã²ã¨ã¤æ°ããã¤ã³ã¹ã¿ã³ã¹ãããã¾ãã ããã¯ãããã¤ã¹ãã¬ã¼ã¸ã¤ã³ã¹ã¿ã³ã¹ãã¨ããã¤ã³ã¹ã¿ã³ã¹ã§ãã ããã¤ã¹ãã¬ã¼ã¸ã¤ã³ã¹ã¿ã³ã¹ãã§ã¯ãæ大ç§é2.4GBã®I/Oæ§è½ãåºãã24åã®ãã¼ããã£ã¹ã¯ãã©ã¤ãã§æ§æããã48TBã®ã¤ã³ã¹ã¿ã³ã¹ã¹ãã¬ã¼ã¸ãæä¾ãã¾ãã ã¤ã³ã¹ã¿ã³ã¹ãã¨ã«å¤§å®¹éã®ãã¤ã¬ã¯ãã¢ã¿ãããã¹ãã¬ã¼ã¸ãæã¡ãAWSã®ãã°å¦çããã¼ã¿ã¦ã§ã¢ãã¦ã¸ã³ã°ã®ãããªãã¼ã¿éä¸åã®ã¢ããªã±ã¼ã·ã§ã³ã大éã®ãã¼ã¿ã»ããã®å¦çã¨åæããããã®ä¸¦åãã¡ã¤ã«ã·ã¹ãã ã«æé©ãªã¤ã³ã¹ã¿ã³ã¹ã¨ãªã£ã¦ãã¾ãã ãã¡ãã¯ã以åã®è¨äºã§ç´¹ä»ããæ°ããã¤ã³ã¹ã¿ã³ã¹ã¨åãããç¾å¨ã¯ç±³å½æ±é¨ãªã¼
æ±äº¬ãªã¼ã¸ã§ã³ã§EC2ãµã¼ããéç¨ãã¦ããã®ã§ããããµã¼ãã®æéãæ¥æ¬æ¨æºæã§ã¯ãªãä¸çæ¨æºæã«ãªã£ã¦ãã¦å°ã£ã¦ã¾ããããã®è§£æ±ºæ¹æ³ã§ãã Amazon Linuxã®å ´å 使ã£ã¦ããOSã®ã¤ã¡ã¼ã¸ãã¨ã«è¨å®æ¹æ³ãéãããã§ãã Amazon Linuxã®å ´åã¯cpã³ãã³ãã ãã§è¨å®ã§ãã¾ãã EC2ãµã¼ãã¯AWSå´ã§NTPãå©ç¨ãã¦æéãè¨å®ãã¦ããã¦ãã¾ãããã®ä»çµã¿ããããã¨ããããããã¨ã«ãªããããªã®ã§ãã¤ã³ã¹ã¿ã³ã¹ã®ãã¼ã«ã«æéãæ¥æ¬è¨å®ã«ããã ãã«ãã¦ããã¾ãããã è¨å®æ¹æ³ã¯ã/usr/share/zoneinfo/Japan ã /etc/localtime ã¨ãã¦ã³ãã¼ããã ãã§ããã¤ã³ã¹ã¿ã³ã¹ã®åèµ·åã¯ä¸è¦ã§ãã念ã®ããã«ãdate ã³ãã³ãã§æéãæ£ããã確èªãã¦ããã¾ãããã ãã®ãµã¤ãã®æ å ±ãåèã«ãã¾ããã EC2ã®æå¼ã - yoshikiexã®æ¥è¨ Amazo
EC2ããPHPã使ã£ã¦å¤é¨APIã使ããã®ã§ã次ã¯è¿ã£ã¦ããå¤ãDBã«ä¿åãããã¨ããã§ãã AWSã§ã¯ãDBã ãã§ç¬ç«ããRDSã¨ãããµã¼ãã¹ãããã®ã§ãããå©ç¨ãã¦ãã¾ãã ä»åã®ãããã¨ã§ãã â PDO(PHP Data Object)ãç¥ã â¡PDOã使ã£ã¦RDS(MySQL)ã«ã¢ã¯ã»ã¹ â¢PDOã使ã£ã¦ã¯ã¨ãªãçºè¡ â£SQLã«ãã©ã¡ã¼ã¿ã¼ã渡ã â åææ¡ä»¶ [Web] AWSã使ã£ã¦ã¿ã â EC2ã¨RDSã®ç«ã¡ä¸ããæ¸ã¾ãã¦ã ã³ãã³ãã©ã¤ã³ã§RDS(MySQL)ã«æ¥ç¶ã§ããç¶æ ã«ãªã£ã¦ããã㨠â PDO(PHP Data Object)ãç¥ã PHP5ãããMySQLã使ãã¨ãã«ä¾¿å©ãªã¯ã©ã¹ãç»å ´ãã¾ããã ãPDOãã§ã°ã°ãã¨è©³ãã説æãåºã¦ããã®ã§ãã¡ããåç §ãã ããã ãåèãã¯ããã¦ã®PDO â¡PDOã使ã£ã¦RDS(MySQL)ã«ã¢ã¯ã»ã¹ â¢PDOã使ã£ã¦ã¯ã¨ãªãçºè¡
ã¯ããã¾ãã¦ãäºåç°ã®ãCliskï¼ã¯ãªã¹ã¯ï¼ãã¨ããä¼ç¤¾ã§ã·ã¹ãã ã¨ã³ã¸ãã¢ãªã©ããã¦ããè¹æ²¢ã¨ç³ãã¾ããçåã§ããLIGã®ã´ã¦ãããç´³ããã¨é ãé ã¿äº¤ããã¦ãããã¡ã«ãLIGããã°ã«è¨äºãæ¸ããã¦ããã ããã¨ã«ãªãã¾ããããããããé¡ããããã¾ãã AWSã¨ã¯ï¼ http://aws.amazon.com/jp/ AWSï¼Amazon Web Servicesã®ç¥ï¼ã¨ã¯ãAmazonãæä¾ãã¦ããã¯ã©ã¦ããµã¼ãã¹ã®ç·ç§°ã§ããã®ä¸ã«ã¯ãã¾ãã¾ãªãµã¼ãã¹ãå«ã¾ãã¦ãã¾ãã EC2ï¼ä»®æ³ãµã¼ãã¼ï¼ãS3ï¼ã¹ãã¬ã¼ã¸ï¼ãRDSï¼ãªã¬ã¼ã·ã§ãã«ãã¼ã¿ãã¼ã¹ï¼ãCloudWatchï¼ç£è¦ï¼ãªã©ãããããã®ãµã¼ãã¹ãæä¾ããã¦ãã¦ããããã®ITã¤ã³ãã©ã®ãªã½ã¼ã¹ãã使ãããã¨ãã«ã使ããããã®ãã使ãããã ããå¿ è¦ãªã¹ããã¯ã§ãå©ç¨ãããã¨ãã§ããã®ãç¹å¾´ã§ãã å¤ãã®ãµã¼ãã¹ã¯ç®¡çç»é¢ããæä½ã§ã
ããã«ã¡ã¯ï¼ JQã§ãã ååã¯ãRDSç·¨ï½Oracle Enterprise Managerï½ã ã¨ãããã¨ã§ãRDSã®Oracleã§OEMãè¨å®ãã¦ã¿ã¾ããã ä»åã¯ãEC2ç·¨ï½Amazon Linux Python Update 2.7ï½ãã¨é¡ãã¦ãAmazon Linux ã®Python ãã¢ãããã¼ããã¦botoãã¤ã³ã¹ãã¼ã«ãã¦ã¿ããã¨æãã¾ãã Amazon Linuxã§ã¯æ¨æºã§Python2.6ãã¤ã³ã¹ãã¼ã«ããã¦ãã¾ãã Python2.7ã使ç¨ãããå ´åã«åãã¦ã¤ã³ã¹ãã¼ã«ãã¦ã¿ããã¨æãã¾ãã Python2.7ã®ã¤ã³ã¹ãã¼ã« 1.ç¾ç¶ã®Versionç¢ºèª å ãã¯ç¾å¨ã¤ã³ã¹ãã¼ã«ããã¦ããVersionã確èªãã¦ã¿ã¾ãã
Managed WordPress Hosting ç§ãã¡ã¯ããµã¼ãã®ãµãã¼ããã³ã¢ã®ã¢ãããã¼ããããã¯ã¢ãããããã³å®æçãªã»ãã¥ãªãã£ç£æ»ãåããã¤ã³ãã©ã¹ãã©ã¯ãã£ã®æ§ç¯ã»ã¡ã³ããã³ã¹ããã¦ãã¾ãããã®ããããããªããã©ãã«ããã£ãã¨ãã¦ã復æ§ãå¯è½ã§ããã¾ãããã¡ã¤ã¢ã¦ã©ã¼ã«ãDDoSã WAF ã¨ãã£ããã«ãã¤ã³ã®ã»ãã¥ãªãã£å¯¾ç㧠WordPress ãµã¤ããä¿è·ãã¾ããããã«ããªã¼ãã¹ã±ã¼ãªã³ã°ã«ãããé«ãã©ãã£ãã¯ã«ä¼´ããµã¤ãã®ãã¦ã³ã¿ã¤ã ã®çºçãæãããã¾ãã 詳細ã¯ãã¡ã Amazon Machine Images for WordPress Amazon Web Services ä¸ã§ æé«ã®ããã©ã¼ãã³ã¹ãæã¤ããã¥ã¼ãã³ã°æ¸ã¿ WordPress å°ç¨ AMI ã§ãã NGINXãPHP7ãHHVMãApacheãMySQL ãªã©ãããã«å®è¡ã§ããããã¦é«ãä¿¡é ¼
AWS ä¸ã® DNS ç°å¢ã§ãã Amazon Route 53 ã«ã DNS ã移ãã¦ã¿ã¾ãããããã¯ããã®è¨é²ã Amazon Route 53 http://aws.amazon.com/jp/route53/ ä¸è¬çã« DNS ã¨ããã°ãLinux ç³»ã®æ¹ã§ããã° BIND ã unbound ãæãåºãããæ¹ãå¤ãã®ã§ã¯ãªãã§ãããããBIND ã§ããã°ãnamed.conf ã«ã¾ã¼ã³ã®ã¨ã³ããªã追å ããããã»ã«ã³ããªDNSãµã¼ããç»é²ãããã¨ãã¾ã¼ã³è»¢éããããâ¦ãããæä½æ¥ã ã¨ãçµæ§é¢åã ã£ãããã¾ããããã¦ãã«ãª Serial ãæ´æ°ãå¿ãã¦ãä¸æ¥ä¸å»¶ã ã¨æ©ãã ããã¬ã³ã¼ãã«ã.ããã¤ãå¿ã㦠www.example.jp.example.jp ã®ãããªæ å ±ããããã¨ãã ä¸æ¹ãAmazon Route 53 ã¯ããã©ã¦ã¶ã§ç»é¢ãããããããã ãã§ãã¡ã¤ã³ã管çåºæ¥ã¦ãã¾ã
ã©ãã大ç§ã§ãã EC2ããEã¡ã¼ã«ãéãã¨ããæ¡ä»¶ãããããããã¾ããããããã¦çµæ§ãªç¢ºçã§ãã©ãããã§ããã(æ¶ç®)ããããªè¦ãçµé¨ããã¹ããã©ã¯ãã£ã¹ã¨ãã¦ã¾ã¨ãã¦ã¿ã¾ãããä¸å¿æè¡çãªã¨ããã¯ç¶²ç¾ ããã¤ããã§ãããã¡ã¼ã«ã»ãã¥ãªãã£ã®å°éã§ã¯ãªãã®ã§ãä¸åãééããããã°ãææãã ããã ã§ã¯ãã¡ã¼ã«éä¿¡ãã©ãã«ã®å å¶ã§ãããã¹ãã ã¡ã¼ã«ã¨ãã®å¯¾çãããç´¹ä»ãã¦ããã¾ãã ã¹ãã ã¡ã¼ã«ã¨ã®éããã¤ã¸ã§ã¹ã Eã¡ã¼ã«ã®æ´å²ã¯ãã¹ãã ã¡ã¼ã«ã¨ã®éãã®æ´å²ã¨è¨ãã¾ãã ä¸ç¹å®å¤æ°ã«éä¿¡ãããã¹ãã ã¡ã¼ã«(æªæ¿è«¾ã®åºåã¡ã¼ã«)ã¯ãã¡ã¼ã«åä¿¡è ã«ä¸å¿«ãªæãããããã¨ã¨ãã«ãã¡ã¼ã«ãµã¼ãã¼ã®ã¡ã¼ã«æµéãççºçã«å¢å ãããé·ããã¡ã¼ã«ãµã¼ãã¼ç®¡çè ãæ³£ããã¦ãã¾ããã ãã®ã¹ãã ã¡ã¼ã«ããªãã¨ãæéãããã¨ãç¾å¨ã§ã¯ä¸»ã«ä»¥ä¸ã®ãããªå¯¾çãè¡ããã¦ãã¾ãã 1. éä¿¡ã¡ã¼ã«ãµã¼ãã¼å´ã®ãããã¯ã¼ã¯
å ¬å¼APIãªãã¡ã¬ã³ã¹ã«ãã㨠ETag The entity tag is a hash of the object. The ETag only reflects changes to the contents of an object, not its metadata. The ETag is determined when an object is created. For objects created by the PUT Object operation and the POST Object operation, the ETag is a quoted, 32-digit hexadecimal string representing the MD5 digest of the object data. For other objects, the ETag may o
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}