³ë¹«Çö ´ëÅë·É ¹è³Ê
  ±è¼ºÅÂÀÇ Tech Tips(Linux, PHP, Apache, DBMS, Mobile)
  http://www.supersky.pe.kr  
¾È³çÇϽʴϱî? ±è¼ºÅÂÀÔ´Ï´Ù.
Linux, Apache, PHP, Mysql, Mobile °ü·Ã Tech Tips Á¤º¸¸¦ Á¦°øÇÕ´Ï´Ù.
 
<<   2024 Nov   >>
S M T W T F S
272829303112
3456789
10111213141516
17181920212223
24252627282930
1858957 113
  
DNS Powered by DNSEver.com
  ++ [Æß] Apache2 (with mod_ssl) + PHP4 ¼³Ä¡ --DSO ¹æ½Ä  -  2007/12/08 11:05
Á¦¸ñ ¾øÀ½

¾ÆÆÄÄ¡ À¥¼­¹ö´Â °ü¸®ÀÚ°¡ ¸ðµâµéÀ» ¼±ÅÃÇÏ¿© ¼­¹ö¿¡ Æ÷ÇÔÇÒ ±â´ÉÀ» °áÁ¤ÇÒ ¼ö ÀÖ´Â ¸ðµâÈ­µÈ
ÇÁ·Î±×·¥ÀÌ´Ù. ¼­¹ö¸¦ ÄÄÆÄÇÒ¶§ httpd ½ÇÇàÆÄÀÏ¿¡ Á¤ÀûÀ¸·Î ¸ðµâÀ» ÄÄÆÄÀÏÇÒ ¼ö ÀÖ´Ù.
¾Æ´Ï¸é ¸ðµâÀ» httpd ½ÇÇàÆÄÀÏ°ú ºÐ¸®ÇÏ¿© µ¿Àû°øÀ¯°´Ã¼(Dynamic Shared Objects, DSO)·Î
ÄÄÆÄÀÏÇÒ ¼ö ÀÖ´Ù. DSO ¸ðµâÀº ¼­¹ö¸¦ ÄÄÆÄÀÏ ÇÒ ¶§ ÄÄÆÄÀÏÇϰųª,
Apache Extension Tool (apxs)À» »ç¿ëÇÏ¿© ³ªÁß¿¡ ÄÄÆÄÀÏÇÏ¿© Ãß°¡ÇÒ ¼ö ÀÖ´Ù.

1. ¾ÆÆÄÄ¡ÀÇ ¼³Ä¡

#./configure
--prefix=/usr/local/apache
--enable-so                            // mod_so°¡ Áö¿øÇÏ´Â DSO±â´É »ç¿ë
--enable-ssl=shared           // mod_ssl ¸ðµâÀ» DSO¸ðµâ·Î ÄÄÆÄÀÏ
--with-ssl=DIR                       // mod_sslÀ» »ç¿ëÇÏ´Â °æ¿ì configure´Â ¼³Ä¡µÈ OpenSSLÀ»
                                                  Ã£´Â´Ù. ´ë½Å ÀÌ ¿É¼ÇÀ» »ç¿ëÇÏ¿© SSL/TLS µµ±¸ÀÇ µð·ºÅ丮
                                                  °æ·Î¸¦ ¾Ë·ÁÁÙ ¼ö ÀÖ´Ù.
                                                   (e.g. /usr/local/openssl, /usr/share/ssl)

--enable-rewirte
--enable-speling


========================  1.x  ===============================
--activate-module=src/modules/PHP4/libPHP4.a    // It will be created.          
--enable-modules=PHP4
--enable-modules=so                // mod_so ÀÇ Á¤Àû¸µÅ©
=============================================================

#make
#make install

[Âü°í]
2.0.37 ÀÌÈÄ #make certificate ´Â Á¦°ÅµÆ´Ù.
¿øÇÑ´Ù¸é openssl command ¸¦ ÀÌ¿ëÇؼ­ »ý¼ºÇؾßÇÑ´Ù.


1. openssl¸í·É¾î¸¦ ÀÌ¿ëÇÏ¿© Web ServerÀÇ RSAÅ°¸¦ »ý¼ºÇÑ´Ù.
# openssl genrsa -des3 -out mycert.key 1024
(pass phrase ¾ø´Â key ¸¸µé¶©)
#openssl genrsa 1024 > mycert.key

2. À̶§ »ý¼ºµÇ´Â °³ÀÎÅ°´Â ¹Ýµå½Ã ¹é¾÷À» ¹Þ¾Æ³õ°í »ç¿ëÇÏ´Â °ÍÀÌ ÁÁ´Ù.
»ý¼ºµÈ Å°´Â ´ÙÀ½ ¸í·ÉÀ» ÀÌ¿ëÇÏ¿© ³»¿ëÀ» È®ÀÎÇÒ¼ö ÀÖ´Ù.
# openssl rsa -noout -text -in mycert.key

3. »ý¼ºµÈ ºñ¹ÐÅ°¸¦ ÀÌ¿ëÇÏ¿© Self Sign µÈ ÀÎÁõ¼­ È­ÀÏÀ» ¸¸µç´Ù.
# openssl req -new -x509 -days 365 -key mycert.key -out mycert.crt


°øÀÎÀÎÁõ±â°ü¿¡ CSRÀ» º¸³»±â À§ÇØ...
=======================================================================================
4. »ý¼ºµÈ Å°¸¦ ÀÌ¿ëÇÏ¿© CSRÀ» »ý¼ºÇÑ´Ù.
$ openssl req -new -days 365 -key mycert.key -out mycert.csr
CSR »ý¼ºÁß Å°ÀÇ ±æÀ̸¦ ¹¯´Â Áú¹®¿¡´Â 1024bit¸¦ ¼±ÅÃÇÏ°í ±×¿Ü´Â ¸ðµÎ Default¸¦ ¼±ÅÃÇÑ´Ù. Áú¹®¿¡ ÀϹÝÀûÀÎ CSR ÀÔ·ÂÇ׸ñÀ» ´äÇÑ´Ù.

5. »ý¼ºµÈ È­ÀÏÀº ´ÙÀ½ ¸í·ÉÀ¸·Î ³»¿ëÀ» È®ÀÎ ÇÒ ¼ö ÀÖ´Ù.
$ openssl req -noout -text -in server.csr
=======================================================================================

/usr/local/apache/conf/ssl.conf ¼öÁ¤
SSLCertificateFile /usr/local/apache/conf/ssl.crt/mycert.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/mycert.key
#apachectl startssl

2. PHP ¼³Ä¡
#/usr/local/php-4.3.7/.configure
--with-mysql=/usr/local/mysql
--with-config-file-path=/etc                 // php.ini °¡ À§Ä¡ÇÒ °æ·Î
--with-xml
--enable-versioning
--enable-url-includes
--enable-trans-id
--enable-ftp
--enable-bcmath
--enable-sysvshm=yes
--enable-sysvsem=yes
--enable-inline-optimization
--disable-debug
--enable-modules=so                      // (DSO¼³Ä¡¸¦ À§ÇÏ¿©)
--with-apxs2=/usr/local/apache/bin/apxs
--with-apache=/usr/local/apache              // Apache 2.x ¿¡¼­´Â ÇÊ¿ä¾ø´Ù.

#make
#make install

3. PHPȯ°æ¼³Á¤ ÆÄÀÏ
#cp php.ini-dist /etc/php.ini
php.ini-dist : display_error ¿É¼ÇÀÌ ÄÑÁ® ÀÖ¾î µð¹ö±ëÇϱ⿡ Æí¸®. °³¹ß¿ë ¼­¹ö
php.ini-recommeded : ¼­ºñ½º¿ë ¼­¹ö

4. PHP¸ðµâÀ» Àбâ À§ÇØ httpd.conf ÆÄÀÏÈ®ÀÎ
PHP 4´Â:  LoadModule php4_module libexec/libphp4.so
PHP 5´Â:  LoadModule php5_module libexec/libphp5.so

5. httpd.conf ¿¡ phpÆÄÀÏÀ» ½ÇÇàÇϱâ À§ÇØ Ãß°¡
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

-------- ÀÌ·¸°Ôµµ..
./configure --prefix=/usr/local/apache2
            --enable-so
            --enable-ssl=shared
            --with-ssl=/usr/local/openssl-0.9.7e
            --enable-rewrite
            --enable-speling
            --enable-cgi







      << prev     1 ...  65  66  67  68  69  70  71  72  73 ...  163     next >>