Âç²È¥á¥â/MAMP/Mac OSX¥í¡¼¥«¥ë¤ËMAMP¤Ç¥µ¥¤¥ÈÀ©ºî´Ä¶­¤ò¹½ÃÛ http://www.ark-web.jp/sandbox/design/wiki/262.html

Âç²È¥á¥â/MAMP/Mac OSX¥í¡¼¥«¥ë¤ËMAMP¤Ç¥µ¥¤¥ÈÀ©ºî´Ä¶­¤ò¹½ÃÛ
[edit]

Mac OSX¥í¡¼¥«¥ë¤ËMAMP¤Ç¥µ¥¤¥ÈÀ©ºî´Ä¶­¤ò¹½ÃÛ

[edit]

Ìܼ¡

[edit]

ÌÜŪ

Ä̾掠¥¤¥È¤òÀ©ºî¤·¤Æ¤¤¤ëÃæ¤Çº¤¤ë¤³¤È¤Ï¤¤¤¯¤Ä¤«¤¢¤ê¤Þ¤¹¤¬¡¢¤³¤³¤Ç¤Ï°Ê²¼¤Î¤è¤¦¤ÊÅÀ¤ò¥í¡¼¥«¥ë¤ËMAMP¤Ç´Ä¶­¤òÍÑ°Õ¤·¤Æ³Îǧ¤Ç¤­¤ë¤è¤¦¤·¤¿¤¤»×¤¤¤Þ¤¹¡£

¤Þ¤¿¡¢¾åµ­¤È¤ÏÊ̤ËÌäÂê¤È¤Ê¤ë¤Î¤¬¡¢Ê£¿ô¤Î¥µ¥¤¥ÈÀ©ºî¤¬Æ±»þ¤Ë¿Ê¹Ô¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¡¢¥µ¥¤¥È¤´¤È¤Ë¥ë¡¼¥È¤«¤é¤Î¥Ñ¥¹¤Çµ­½Ò¤µ¤ì¤¿ÆâÍƤò³Îǧ¤Ç¤­¤ë´Ä¶­¤¬Íߤ·¤¤¡¢¤È¤¤¤¦¤³¤È¤Ç¤¹¡£

¥Ç¥Õ¥©¥ë¥È¤Î¤Þ¤Þ¤À¤ÈMAMP¤ÎDocument Root¤Ï

/Applications/MAMP/htdocs

¤Î¤ß¤È¤Ê¤Ã¤Æ¤ª¤ê¡¢Ê£¿ô¤Î¥µ¥¤¥ÈÀ©ºî¤ò¤·¤Æ¤¤¤ë¾ì¹ç¡¢¤½¤ÎÅÔÅÙDocument Root¤ÎÀßÄê¤òÊѹ¹¤¹¤ë¤Î¤ÏÌÌÅݤʤ³¤È¤Ë¤Ê¤Ã¤Æ¤­¤Þ¤¹¡£
¤½¤³¤Ç

¤È¤¤¤¦ÅÀ¤â²ò·è¤·¤¿¤¤¤È»×¤¤¤Þ¤¹¡£

¤Þ¤¿¡¢¤¢¤ï¤»¤Æ

¤È¤¤¤¦ÅÀ¤â¡¢MAMP¤È¤¤¤¦¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òÍѤ¤¤Æ²ò·è¤·¤Æ¤¤¤³¤¦¤È»×¤¤¤Þ¤¹¡£

[edit]

MAMP¤Î¥À¥¦¥ó¥í¡¼¥É

MAMP¤Î¥µ¥Ý¡¼¥È¥µ¥¤¥È¤è¤êMAMP¤ò¥À¥¦¥ó¥í¡¼¥É¤·¤Þ¤¹¡£
¤Ê¤ª¡¢º£²ó¤Ï Mac OS¡§OSX 10.5 ¤Î´Ä¶­¤Ë¤Æºî¶È¤ò¹Ô¤Ã¤Æ¤Þ¤¹¡£

[edit]

MAMP¤Î¥¤¥ó¥¹¥È¡¼¥ë

¥À¥¦¥ó¥í¡¼¥É¤·¤¿mamp_1.7.1.dmg¤òŸ³«¤·¤Æ¥¤¥ó¥¹¥È¡¼¥ë¤·¤Þ¤¹¡£

¡Ú²èÁü¡§¥¤¥ó¥¹¥È¡¼¥ë¥­¥ã¥×¥Á¥ã¡Û

¼¡¤ËMAMP¥Õ¥©¥ë¥À¤òApplication¥Õ¥©¥ë¥À¤Ë¥É¥é¥Ã¥¯&¥É¥í¥Ã¥×¤·¤Þ¤¹¡£¤³¤ì¤ÇMAMP¤Î¥¤¥ó¥¹¥È¡¼¥ë¤Ï´°Î»¤Ç¤¹¡£

[edit]

MAMP¤Î¥¢¥Ã¥×¥°¥ì¡¼¥É

¥¤¥ó¥¹¥È¡¼¥ë¤ò¹Ô¤¦¤È¡¢°ÊÁ°¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤·¤Æ¤¤¤¿MAMP¥Õ¥©¥ë¥ÀÆâ¤Î¥Ç¡¼¥¿¤Ïºï½ü¤µ¤ì¤Æ¤·¤Þ¤¤¤Þ¤¹¡£
°Ê²¼¤Î¥¹¥Æ¥Ã¥×¤ÎÄ̤ê¤Ë¹Ô¤¨¤ÐMAMP¤ò¥¢¥Ã¥×¥°¥ì¡¼¥É¤Ç¤­¤Þ¤¹¡£

  1. Apache¡¢MySQL¤òÄä»ß¤µ¤»¤Þ¤¹¡£
  2. MAMP¤ò½ªÎ»¤·¤Þ¤¹¡£
  3. ¥Ç¡¼¥¿¥Ù¡¼¥¹¡¢¥¦¥§¥Ö¥µ¥¤¥È¥Ç¡¼¥¿¤ª¤è¤ÓÀßÄê¥Õ¥¡¥¤¥ë¤Ê¤ÉMAMP¥Õ¥©¥ë¥ÀÆâ¤Î½ÅÍפʥե¡¥¤¥ë¤ò¥Ð¥Ã¥¯¥¢¥Ã¥×¤·¤Þ¤¹¡£¤É¤ì¤ò¥Ð¥Ã¥¯¥¢¥Ã¥×¤¹¤Ù¤­¤«Ê¬¤«¤é¤Ê¤¤¾ì¹ç¤Ï¡¢Î㤨¤Ð¡ÖMAMP_old¡×¤Ê¤É¡ÖMAMP¡×¥Õ¥©¥ë¥À¤Î̾Á°¤òÊѤ¨¤Æ¤ª¤­¤Þ¤¹¡£
  4. ¥¤¥ó¥¹¥È¡¼¥ë¥Ç¥£¥¹¥¯¥¤¥á¡¼¥¸¤è¤ê¡¢Application¥Õ¥©¥ë¥À¤ØMAMP¥Õ¥©¥ë¥À¤ò¥³¥Ô¡¼¤·¤Þ¤¹¡£
  5. ¥Ð¥Ã¥¯¥¢¥Ã¥×¥Ç¡¼¥¿¤«¤é¥Ç¡¼¥¿¤ò¸µ¤ËÌᤷ¤Þ¤¹¡£¤­¤Á¤ó¤ÈÆ°ºî¤¹¤ë¤³¤È¤ò³Îǧ¤¹¤ë¤Þ¤Ç¡¢¥Ð¥Ã¥¯¥¢¥Ã¥×¤·¤¿¥Õ¥¡¥¤¥ë¤ä¥ê¥Í¡¼¥à¤·¤¿MAMP¥Õ¥©¥ë¥À¤ÏÊݸ¤·¤Æ¤ª¤­¤Þ¤¹¡£
  6. MAMP¤òµ¯Æ°¤·¤Þ¤¹¡£
  7. ÀßÄê¤ò³Îǧ¤·¤Þ¤¹¡£
[edit]

SSI´Ø·¸¤ÎÀßÄê

SSI¤ò»ÈÍѲÄǽ¤Ë¤¹¤ë¤¿¤á¡¢¤Þ¤º

/Application/MAMP/conf/apache/httpd.conf

¤ò½¤Àµ¤·¤Þ¤¹¡£
¢¨Ç°¤Î¤¿¤á½¤ÀµÁ°¤Î¥Õ¥¡¥¤¥ë¤Î¥Ð¥Ã¥¯¥¢¥Ã¥×¤ò¤È¤Ã¤Æ¤ª¤­¤Þ¤¹¡£
httpd.conf¤«¤é¡ÖSSI¡×¤È¤¤¤¦µ­½Ò¤ò¸¡º÷¤¹¤ë¤È¡¢°Ê²¼¤Î¤è¤¦¤Êµ­½Ò¤¬¤ß¤Ä¤«¤ê¤Þ¤¹¡£

#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

¤Ê¤ª¡¢pache1.3¤ÇSSI¤òÍ­¸ú¤Ë¤¹¤ë¤Ë¤Ï¡¢AddHandler?¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤ò»ÈÍѤ·¤ÆÀßÄꤷ¤Æ¤Þ¤·¤¿¤¬¡¢Apache2.0°Ê¹ß¤ÇSSI¤òÍ­¸ú¤Ë¤¹¤ë¤Ë¤Ï¡¢AddOutputFilter?¥Ç¥£¥ì¥¯¥Æ¥£¥Ö¤ò»ÈÍѤ·¤Þ¤¹¡£
¥Ç¥Õ¥©¥ë¥È¤Î¤Þ¤Þ¤Ç¤¹¤È¥³¥á¥ó¥È¥¢¥¦¥È¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢°Ê²¼¤Î¤è¤¦¤ËÄɵ­¤·SSI¤ò»ÈÍѲÄǽ¤È¤·¤Þ¤¹¡£

#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

³ÈÄ¥»Ò¤¬.html¤Ç¤âSSI¤¬É½¼¨¤µ¤ì¤ë¤è¤¦¤Ë¤¹¤ë
¾åµ­¤ÎÀßÄê¤ÇSSI¤ò»ÈÍѲÄǽ¤È¤·¤Þ¤·¤¿¡£Â³¤¤¤Æ³ÈÄ¥»Ò¡Ö.html¡×¡Ö.htm¡×¤Ç¤âSSI¤ò»ÈÍѲÄǽ¤ËÀßÄꤷ¤Þ¤¹¡£
¤½¤Î¾ì¹ç¤Ï°Ê²¼¤Î¤è¤¦¤Ë³ÈÄ¥»Ò¤òÄɵ­¤·¤Þ¤¹¡£

AddType text/html .shtml .html .htm
AddOutputFilter INCLUDES .shtml .html .htm
[edit]

Virtual Host¤òÍѤ¤¤ÆMAMP¤ÇÊ£¿ô¥µ¥¤¥È¤ò´ÉÍý¤¹¤ë

MAMP¤Ç¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥Ý¡¼¥ÈÀßÄê¤Ï°Ê²¼¤Î¤È¤ª¤ê¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£

¤Þ¤¿¡¢MAMP¤ÎDocument Root¤Ï¥Ç¥Õ¥©¥ë¥È¤À¤È

/Applications/MAMP/htdocs

¤È¤Ê¤Ã¤Æ¤ª¤ê¡¢¥Ö¥é¥¦¥¶¤Ç¥¢¥¯¥»¥¹¤¹¤ë¾ì¹ç¤Ï

http://localhost:8888

¤Ç¥¢¥¯¥»¥¹¤·¤Þ¤¹¡£

¤³¤³¤Ç¤Ï¡¢Ê£¿ô¥µ¥¤¥È¤ÎÀ©ºî¤òƱ»þ¿Ê¹Ô¤¹¤ë¾ì¹ç¤Ë¡¢¥µ¥¤¥ÈËè¤Ë¥Ç¥£¥ì¥¯¥È¥ê¤òʬ¤±¤Æ´ÉÍý¤Ç¤­¤ë¤è¤¦ÀßÄꤷ¤Æ¤ß¤Þ¤¹¡£
¤³¤ì¤Ë¤è¤ê¡¢³Æ¥µ¥¤¥È¤Î¥Ç¥£¥ì¥¯¥È¥ê¤´¤È¤Ë¥µ¥¤¥È¥ë¡¼¥È¤¬ÀßÄꤵ¤ì¤ë¤¿¤á¡¢¥ë¡¼¥È¤«¤é¤Î¥Ñ¥¹¤â³Îǧ¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

º£²ó¤Ï

http://localhost:¥Ý¡¼¥ÈÈÖ¹æ¡ÊǤ°Õ¤Î¿ô»ú¡Ë

¤Ç¥µ¥¤¥È¤ò¿¶¤êʬ¤±¤Æɽ¼¨¤Ç¤­¤ë¤è¤¦¤ËÀßÄꤷ¤Þ¤¹¡£
²¾¤Ë¡¢

¤Ç³Îǧ¤Ç¤­¤ë¤è¤¦ÀßÄꤹ¤ë¤³¤È¤òÁÛÄꤷ¤Þ¤¹¡£
¢¨¤Ê¤ª¡¢¥Ý¡¼¥ÈÈÖ¹æ¤Ï¾¤ÇÍøÍѤ·¤Æ¤¤¤ë¥µ¡¼¥Ó¥¹¤Î¥Ý¡¼¥ÈÈÖ¹æ¤È½ÅÊ£¤·¤Ê¤¤¤è¤¦µ¤¤ò¤Ä¤±¤Æ¤¯¤À¤µ¤¤

¤Þ¤º¡¢

/Application/MAMP/conf/apache/httpd.conf

¤ò½¤Àµ¤·¤Þ¤¹¡£
¢¨Ç°¤Î¤¿¤á½¤ÀµÁ°¤Î¥Õ¥¡¥¤¥ë¤Î¥Ð¥Ã¥¯¥¢¥Ã¥×¤ò¤È¤Ã¤Æ¤ª¤­¤Þ¤·¤ç¤¦¡£

¾åµ­¥Õ¥¡¥¤¥ë¤ò¥¨¥Ç¥£¥¿¤Ç³«¤­¡¢¡ÖListen 8888¡×¤Èµ­½Ò¤µ¤ì¤Æ¤¤¤ë²Õ½ê¤ò¸«¤Ä¤±¤Þ¤¹¡£

¤³¤Î¸å¤í¤ØǤ°Õ¤Î¥Ý¡¼¥ÈÈÖ¹æ¤ÎÀßÄê¤òµ­½Ò¤·¤Þ¤¹¡£

Listen 8888
Listen 8001
Listen 8002
Listen 8003

¤µ¤é¤Ë¥Ý¡¼¥ÈÈÖ¹æ¤È³Æ¥µ¥¤¥È¤Î¥Ç¥£¥ì¥¯¥È¥ê¤òɳÉÕ¤±¤ë¤¿¤á¡¢°Ê²¼¤Îµ­½Ò¤òÄɲä·¤Þ¤¹¡£

Listen 8888
Listen 8001
Listen 8002
Listen 8003

<virtualhost *:8001>
DocumentRoot "/Applications/MAMP/htdocs/projectA"
</virtualhost>

<virtualhost *:8002>
DocumentRoot "/Applications/MAMP/htdocs/projectB"
</virtualhost>

<virtualhost *:8003>
DocumentRoot "/Applications/MAMP/htdocs/projectC"
</virtualhost>

httpd.conf¤ò½ñ¤­´¹¤¨¤¿ºÝ¤Ë¤Ï¡¢MAMP¤Î´ÉÍý²èÌ̤ˤÆApache¤òºÆµ¯Æ°¤µ¤»¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡Ê¡Ö¥µ¡¼¥Ð¤òÄä»ß¡×¥Ü¥¿¥ó¤ò²¡²¼¸å¡¢¡Ö¥µ¡¼¥Ð¤òµ¯Æ°¡×¥Ü¥¿¥ó¤ò²¡²¼¡Ë¡£

¡Ú²èÁü¡§MAMP´ÉÍý²èÌÌ¡Û

¥Ö¥é¥¦¥¶¤Ç¥¢¥¯¥»¥¹¤¹¤ë¾ì¹ç¡¢Î㤨¤ÐprojectA¤Î¥µ¥¤¥È¤ò³Îǧ¤¹¤ë¾ì¹ç¤Ï

http://localhost:8001

¤Çɽ¼¨¤Ç¤­¤Þ¤¹¡£
¢¨¥Ö¥é¥¦¥¶¤Ç

http://localhost:8888/projectA/index.html

¤Ç¥¢¥¯¥»¥¹¤·¤Æ¤·¤Þ¤¦¤È¡¢¥ë¡¼¥È¤Ø¤Î¥Ñ¥¹¤Ê¤É¤¬Å¬Àڤ˽èÍý¤µ¤ì¤Þ¤»¤ó

[edit]

¥á¥â

¥Ý¡¼¥ÈÈÖ¹æ¤È³Æ¥µ¥¤¥È¤Î´Ø·¸¤¬Ê£¿ô¤¢¤ë¾ì¹ç¡¢³Ð¤¨¤Æ¤ª¤¯¤Î¤ÏÌÌÅݤǤ¹¡£
¤Þ¤¿/Applications/MAMP/htdocs/Æâ¤Î³Æ¥µ¥¤¥È¤Î¥Ç¥£¥ì¥¯¥È¥ê̾¤ò³Æ¥µ¥¤¥È̾¤ÈɳÉÕ¤±¤¿¥Ç¥£¥ì¥¯¥È¥ê̾¤È¤·¤Æ¤·¤Þ¤¦¤È¡¢¥µ¥¤¥È¤ÎÆþ¤ìÂؤ¨¤ÎºÝ¤Ë¥Ç¥£¥ì¥¯¥È¥ê̾¤âÊѹ¹¤µ¤ì¤Æ¤·¤Þ¤¦¤¿¤á¡¢¤½¤ÎÅÔÅÙ

/Application/MAMP/conf/apache/httpd.conf

¤Î¥Õ¥¡¥¤¥ë¤ò½¤Àµ¤¹¤ëɬÍפ¬À¸¤¸¤Æ¤·¤Þ¤¤¤Þ¤¹¡£

»ä¤Î¾ì¹ç¤Ï

¤Î¤è¤¦¤Ë¤·¤Æ¤ª¤­¡¢¥µ¥¤¥È¤ÎÆþ¤ìÂؤ¨¤¬À¸¤¸¤¿ºÝ¤Ë¤Ï¥Ç¥£¥ì¥¯¥È¥ê̾¤À¤±ÊѤ¨¤ì¤ÐºÑ¤à¤è¤¦¤Ë¤·¤Æ¤Þ¤¹¡£

¤¿¤À¤³¤Î¤Þ¤Þ¤Ç¤¹¤È¥Ý¡¼¥ÈÈÖ¹æ¤Ëɳ¤Å¤¯¥µ¥¤¥È¤ò˺¤ì¤Æ¤·¤Þ¤¤¤¬¤Á¤È¤¤¤¦ÅÀ¤Ï²þÁ±¤µ¤ì¤Þ¤»¤ó¡£
ÅÔÅ٥ǥ£¥ì¥¯¥È¥êÆâ¤Î¥Õ¥¡¥¤¥ë¤ò³Îǧ¤¹¤ë¤Î¤â¤¤¤¤¤Î¤Ç¤¹¤¬¡¢

http://localhost:888

¤Ç¥¢¥¯¥»¥¹¤µ¤ì¤ë

/Applications/MAMP/htdocs/index.html

¤Î¥Õ¥¡¥¤¥ë¤Ë³Æ¥µ¥¤¥È¤È¥Ý¡¼¥ÈÈÖ¹æ¤Î´Ø·¸¤ò¥á¥â¤·¤Æ¤ª¤­¡¢

<a href="http://localhost:8001">¥µ¥¤¥È̾</a>
<a href="http://localhost:8001">¥µ¥¤¥È̾</a>
<a href="http://localhost:8001">¥µ¥¤¥È̾</a>

¤Î¤è¤¦¤Ë¥ê¥ó¥¯¤ÎÀßÄꤷ¤Æ¤ª¤±¤ÐÄ´¤Ù¤ë¼ê´Ö¤¬¾Ê¤±¤Þ¤¹¡£

¡Ú²èÁü¡§¥µ¥¤¥È¥ê¥¹¥È¥Ú¡¼¥¸¤Î¥­¥ã¥×¥Á¥ã¡Û

[edit]

È÷¹Í

Virtual Host¤ÎÀßÄê¤Ë¤Ï¡¢ÀßÄê¥Õ¥¡¥¤¥ë¤ò¥¨¥Ç¥£¥¿¤Ç³«¤¤¤Æ½¤Àµ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£
Document Root¤Î¥Ç¥£¥ì¥¯¥È¥êÊѹ¹¤ÏMAMP¤Î´ÉÍý²èÌ̤ΡִĶ­ÀßÄê¡×¤ÎApache¤Î¹àÌܤ«¤é²Äǽ¤È¤Ê¤Ã¤Æ¤Þ¤¹¤Î¤Ç¡¢ÌÌÅݤǤʤ±¤ì¤Ð´Ä¶­ÀßÄ꤫¤éÅÔÅÙDocument Root¤ÎÊѹ¹¤â²Äǽ¤Ç¤¹¡£
¤½¤Î¾ì¹ç¤Ï³Æ¥Ç¥£¥ì¥¯¥È¥ê̾¤ò³Æ¥µ¥¤¥È̾¤Èɳ¤Å¤¤¤¿Ì¿Ì¾¤È¤·¤Æ¤ª¤¤¤¿¤Û¤¦¤¬Ê¬¤«¤ê¤ä¤¹¤¤¤È»×¤¤¤Þ¤¹¡£

¡Ú²èÁü¡§MAMP¤Î´Ä¶­ÀßÄê²èÌÌ¡Û

[edit]

»²¹Í

¢¨¤³¤Îµ­»ö¤Ï¤Þ¤À½ñ¤­¤«¤±¤Ç¤¹

Åê¹Æ¼ÔÂç²È? | ¥Ñ¡¼¥Þ¥ê¥ó¥¯

| append.gif

¥È¥Ã¥×   ÊÔ½¸ Åà·ë º¹Ê¬ ¥Ð¥Ã¥¯¥¢¥Ã¥× źÉÕ Ê£À½ ̾Á°Êѹ¹ ¥ê¥í¡¼¥É   ¿·µ¬ °ìÍ÷ ñ¸ì¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS
Last-modified: 2008-05-22 (ÌÚ) 10:55:27 (6013d)

¥¢¡¼¥¯¥¦¥§¥Ö¤Î¥µ¡¼¥Ó¥¹¤ä¥½¥ê¥å¡¼¥·¥ç¥ó¤Ï¤³¤Á¤é