Ä¿ÇǴнº, ½Ã½ºÅÛ ¿£Áö´Ï¾îÀÇ ½°ÅÍ
  apache 1.3°ú 2.x¿¡¼­ phpÀÇ SERVER_NAMEº¯¼ö ÀÛ¼ºÀÏ : 2008/06/09 19:26
 
  • ±Û¾´ÀÌ : ÁÁÀºÁøÈ£ ( http://coffeenix.net/ )
  • Á¶È¸¼ö : 9675
     
    Á¦  ¸ñ : apache 1.3°ú 2.x¿¡¼­ phpÀÇ SERVER_NAMEº¯¼ö
    ÀÛ¼ºÀÚ : ÁÁÀºÁøÈ£(truefeel)
    ÀÛ¼ºÀÏ : 2008.6.5(¸ñ)

    ¾ÆÆÄÄ¡ À¥¼­¹ö¿¡´Â UseCanonicalName À̶ó´Â ¿É¼ÇÀÌ ÀÖ´Ù. ÀÌ ¿É¼ÇÀº CGI³ª phpµî¿¡ SERVER_NAME°ú SERVER_PORTº¯¼ö°ªÀ» ³Ñ±æ ¶§, ¾î¶²°ªÀ» ³Ñ±æ °ÍÀÎÁö °áÁ¤ÇÑ´Ù. OnÀ¸·Î ¼³Á¤µÇ¾î ÀÖÀ» °æ¿ì´Â ¾ÆÆÄÄ¡ÀÇ ServerNameÀ¸·Î ÁöÁ¤ÇÑ °ªÀÌ ³Ñ°ÜÁö°í, Off·Î ¼³Á¤µÇ¾î ÀÖÀ» °æ¿ì´Â Ŭ¶óÀÌ¾ðÆ®°¡ ¿äûÇÑ È£½ºÆ®¸í°ú Æ÷Æ®¸íÀÌ ³Ñ°ÜÁø´Ù.

    ÀÌ·± °æ¿ì¸¦ °¡Á¤Çغ¸ÀÚ. www.coffeenix.net ·Î ¼­ºñ½ºµÇ´Â ¼­¹ö°¡ 5´ë¶ó°í Çϰí, °¢ 5´ëÀÇ ¼­¹ö´Â w101~w105.coffeenix.net À̸§À» °®°í ÀÖ´Ù.

     
    ServerName www.coffeenix.net
     


    À§Ã³·³ ¼³Á¤µÇ¾î ÀÖÀ» ¶§ On°ú OffÀÇ Â÷À̸¦ È®ÀÎȳº¸ÀÚ. À¯Àú°¡ ºê¶ó¿ìÀú¿¡¼­ w101.coff...¸¦ ¿äûÇßÀ» ¶§ÀÌ´Ù.

    ´ÙÀ½Àº OnÀ¸·Î ¼³Á¤ÇÑ °æ¿ìÀ̸ç, ServerName¿¡ ¼³Á¤µÈ È£½ºÆ®¸íÀÌ Ãâ·ÂµÈ´Ù.


    OffÀ¸·Î ¼³Á¤ÇÑ °æ¿ìÀ̸ç, ºê¶ó¿ìÀú¿¡¼­ ¿äûÇÑ È£½ºÆ®¸íÀÌ Ãâ·ÂµÈ´Ù.


    UseCanonicalName ¿É¼ÇÀº ¾ÆÇÇÄ¡ 1.3¿¡¼± ±âº»°ªÀÌ OnÀ¸·Î, 2.x´ë(2.0, 2.2)´Â Off·Î µÇ¾î ÀÖ´Ù. ±âº»°ªÀÇ Â÷À̰¡ ÀÖÀ¸´Ï ¹Ýµå½Ã ServerName¿¡¼­ ÁöÁ¤ÇÑ È£½ºÆ®¸íÀÌ ³ª¿Í¾ßÇÒ °æ¿ì ÁÖÀǰ¡ ÇÊ¿äÇÏ´Ù. ´ÙÀ½Àº ¾ÆÆÄÄ¡ À¥¼­¹öÀÇ httpd.conf ÀϺδÙ.

    [ ¾ÆÆÄÄ¡ 1.3.xÀÇ httpd.conf ]
     
    # UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
    # Apache needs to construct a self-referencing URL (a URL that refers back
    # to the server the response is coming from) it will use ServerName and
    # Port to form a "canonical" name.  With this setting off, Apache will
    # use the hostname:port that the client supplied, when possible.  This
    # also affects SERVER_NAME and SERVER_PORT in CGI scripts.
    #
    UseCanonicalName On
     



    [ ¾ÆÆÄÄ¡ 2.2.xÀÇ httpd-default.conf ]
     
    # UseCanonicalName: Determines how Apache constructs self-referencing
    # URLs and the SERVER_NAME and SERVER_PORT variables.
    # When set "Off", Apache will use the Hostname and Port supplied
    # by the client.  When set "On", Apache will use the value of the
    # ServerName directive.
    #
    UseCanonicalName Off
     



    Ä¿ÇǴнº, ½Ã½ºÅÛ ¿£Áö´Ï¾îÀÇ ½°ÅÍ / URL : http://coffeenix.net/board_view.php?bd_code=1654