½Ã½ºÅÛ°ü¸®ÀÚÀÇ ½°ÅÍ Ä¿ÇǴнº Ä¿ÇÇÇâÀÌ ³ª´Â *NIX
Ä¿ÇǴнº
½Ã½ºÅÛ/³×Æ®¿÷/º¸¾ÈÀ» ´Ù·ç´Â °÷
 FAQFAQ   °Ë»ö°Ë»ö   ¸â¹ö¸®½ºÆ®¸â¹ö¸®½ºÆ®   »ç¿ëÀÚ ±×·ì»ç¿ëÀÚ ±×·ì   »ç¿ëÀÚ µî·ÏÇϱâ»ç¿ëÀÚ µî·ÏÇϱâ 
 °³ÀÎ Á¤º¸°³ÀÎ Á¤º¸   ºñ°ø°³ ¸Þ½ÃÁö¸¦ È®ÀÎÇÏ·Á¸é ·Î±×ÀÎÇϽʽÿÀºñ°ø°³ ¸Þ½ÃÁö¸¦ È®ÀÎÇÏ·Á¸é ·Î±×ÀÎÇϽʽÿÀ   ·Î±×Àηα×ÀΠ

°¡ÀÔ¾øÀÌ ´©±¸³ª ±ÛÀ» ¾µ ¼ö ÀÖ½À´Ï´Ù. °øÁö»çÇ׿¡ ´ëÇÑ ´ñ±Û±îÁöµµ..




BBS >> ¼³Ä¡, ¿î¿µ Q&A | ³×Æ®¿÷, º¸¾È Q&A | ÀÏ¹Ý Q&A || Á¤º¸¸¶´ç | AWS || ÀÚÀ¯°Ô½ÃÆÇ | ±¸Àα¸Á÷ || °øÁö»çÇ× | ÀÇ°ßÁ¦½Ã
nginx¿¡¼­ php-cgi.exe°¡ ¿øÀÎ¸ð¸£°Ô Á×´Â ¹®Á¦

 
±Û ¾²±â   ´äº¯ ´Þ±â    Ä¿ÇǴнº, ½Ã½ºÅÛ ¿£Áö´Ï¾îÀÇ ½°ÅÍ °Ô½ÃÆÇ À妽º -> ½Ã½ºÅÛ ¼³Ä¡ ¹× ¿î¿µ
ÀÌÀü ÁÖÁ¦ º¸±â :: ´ÙÀ½ ÁÖÁ¦ º¸±â  
±Û¾´ÀÌ ¸Þ½ÃÁö
¹æ°¡¿ö¿ä
¼Õ´Ô





¿Ã¸®±â¿Ã·ÁÁü: 2011.4.22 ±Ý, 12:52 pm    ÁÖÁ¦: nginx¿¡¼­ php-cgi.exe°¡ ¿øÀÎ¸ð¸£°Ô Á×´Â ¹®Á¦ Àοë°ú ÇÔ²² ´äº¯ ±Û ÆíÁý/»èÁ¦

¾È³çÇϼ¼¿ä,.
¿ö³«ÀÌ ÃÊÂ¥¶ó Çì¸Å³×¿ä.. µµ¿ÍÁֽñ⠹ٶø´Ï´Ù.. ºÎŹµå·Á¿ä..
±×µ¿¾È windows server 2008 64bit ¼­¹ö¿¡¼­ apmÀ¸·Î µ¹¸®´Ù°¡ ¼­¹öºÎÇÏ ¹®Á¦·Î nginx·Î ±³Ã¼¸¦ Çß´ä´Ï´Ù..
¿©±âÀú±â ÁÖ¿öµéÀº Á¤º¸¸¦ Åä´ë·Î ±¸ÃàÀ» Çϱâ´Â Çß°í ±Ù ¸î´ÞÀº º°Å»¾øÀÌ Àß ½á¿Ô´Âµ¥ ¿ä ¸îÀϺÎÅÍ ÀÌÀ¯µµ ¾øÀÌ php-cgi.exe°¡ ¼­¹ö¸¦ Å°¸é ¸î½Ã°£À» ¸ø¹öƼ°í ¿À·ù¸¦ »Õ¾î³»°í Á×½À´Ï´Ù.. ¸Ö °Çµå¸°°Ô ÀÖ¾î¾ß ¿øÀÎÀ» ¾ËÅÙµ¥ ¾Ë±æÀÌ ¾ø³×¿ä.. ¤Ñ,¤Ñ
À̺¥Æ®·Î±×¿¡¼­´Â php5ts.dll¿¡¼­ ¿À·ù°¡ ³µ´Ù°í¸¸ ³ª¿É´Ï´Ù..

Á¤È²»óÀ¸·Î´Â fastcgi ¹®Á¦ÀΰŠ°°Àºµ¥ ´çÃé ¾Ë¼ö°¡ ¾ø³×¿ä..

¼­¹ö ½ÇÇà¿ë ½ºÅ©¸³Æ®´Â ¾Æ·¡¿Í °°ÀÌ Â®½À´Ï´Ù..
SET PHP_FCGI_MAX_REQUESTS=0
SET OPENSSL_CONF=%cd%\bin\openssl\openssl.cnf
%cd%\bin\core\hidec.exe %cd%\bin\php52\php-cgi.exe -b 127.0.0.1:9000 -c %cd%\bin\php.ini

¾Æ·¡´Â nginx.conf ¼³Á¤ ³»¿ëÀ̱¸¿ä..
#user nobody;

# CPU°³¼ö
worker_processes 1;

error_log logs/error.log crit;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid logs/nginx.pid;

#ÀÌ ÇÁ·Î¼¼½º¸¦ ÁöÁ¤ÇÏ¿© ¿­ ¼öÀÖ´Â ÃÖ´ë ÆÄÀÏ¿¡ ´ëÇÑ °ª.
#worker_rlimit_nofile 51200;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;
access_log off;

client_body_temp_path temp/client_body_temp;
fastcgi_temp_path temp/fastcgi_temp;
proxy_temp_path temp/proxy_temp;
uwsgi_temp_path temp/wsgi_temp;
scgi_temp_path temp/scgi_temp;

# ÀÏ¹Ý ¿É¼Ç
ignore_invalid_headers on;
recursive_error_pages on;
sendfile on;
server_name_in_redirect off;
server_tokens off;
# Ãß°¡
#limit_zone gulag $binary_remote_addr 1m;
reset_timedout_connection on;
server_names_hash_bucket_size 128;
#aio on;
directio 64m;
# TCP ¿É¼Ç
tcp_nodelay on;
tcp_nopush on;

# Å©±â Á¦ÇÑ
client_body_buffer_size 5m;
client_header_buffer_size 5m;
client_max_body_size 5m;
# Ãß°¡
#server_names_hash_bucket_size 5m;
large_client_header_buffers 8 8m;

# ½Ã°£ ÃÊ°ú
client_body_timeout 5;
client_header_timeout 5;
keepalive_timeout 0;
send_timeout 5;
# Ãß°¡
keepalive_requests 5;

# ¾ÐÃà
gzip on;
gzip_vary on;
gzip_static on;
gzip_buffers 16 1m;
gzip_http_version 1.1;
gzip_min_length 0;
gzip_comp_level 9;
gzip_types text/css text/xml application/x-javascript application/atom+xml application/rss+xml text/plain image/x-icon application/java-archive application/msword application/pdf application/vnd.ms-excel application/vnd.ms-powerpoint application/vnd.wap.xhtml+xml application/x-xpinstall;

# ±âŸ
fastcgi_param HTTPS on;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 70;
fastcgi_send_timeout 70;
fastcgi_read_timeout 70;
fastcgi_buffer_size 5m;
fastcgi_buffers 8 8m;
fastcgi_busy_buffers_size 8m;
fastcgi_temp_file_write_size 8m;

server {
# Æ÷Æ®
listen 80;
# µµ¸ÞÀÎ
server_name localhost;
# Ȩ µð·ºÅ丮
root www;

#charset koi8-r;
#access_log logs/host.access.log main;

# Index ÆÄÀÏ
location / {
index index.html index.htm index.php;
}

# add expire headers
#location ~* ^.+.(gif|ico|jpg|jpeg|png|flv|swf|pdf|mp3|mp4|xml|txt|js|css)$ {
# expires 30d;
#}
# etc ´ëü
include etc.conf;

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
# php ¼³Á¤
location ~ .*\.php$ {

# do not pass non-existent files for security reasons
if (!-f $document_root$fastcgi_script_name){ return 404; }

fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

# only allow these request methods
#if ($request_method !~ ^(GET|HEAD|POST)$ ){ return 405; }

# deny access to .htaccess files
location ~ /\.ht { deny all; }

# »óÅ ȮÀÎ
location = /stat {
stub_status on;
access_log off;
allow ¾ÆÀÌÇÇ;
deny all;
}
}



»ç¿ëÇÏ´Â ¼­¹ö ȯ°æ¹öÀüÀº ¾Æ·¡¿Í °°½À´Ï´Ù.
* Nginx 1.0.0
* PHP 5.2.17
+ Custom MySQL extension (for MySQL v5.1)
+ Ioncube Loader 4.0.7
+ NuSphere PhpExpress 3.0.1
+ Suhosin 0.9.32.1
+ ZendOptimizer 3.3.3
* PHP 5.3.7-dev
+ Ioncube Loader 4.0.7
+ NuSphere PhpExpress 3.0.1
+ Suhosin 0.9.32.1
* MySQL 5.1.56
* Memcached 1.4.5
* OpenSSL 0.9.8r
* PhpMyAdmin 3.3.11-dev
* Sendmail version 31

Âü°í·Î ¼­¹ö ¸Þ¸ð¸®´Â 4GÀÔ´Ï´Ù.
À§·Î
guestuser
¼Õ´Ô





¿Ã¸®±â¿Ã·ÁÁü: 2011.4.28 ¸ñ, 12:11 pm    ÁÖÁ¦: Windows ȯ°æ¿¡¼­ÀÇ nginx¿Í php Àοë°ú ÇÔ²² ´äº¯ ±Û ÆíÁý/»èÁ¦

¸®´ª½º³ª À¯´Ð½º °è¿­ÀÇ OS¿Í ´Þ¸® Windows ȯ°æ¿¡¼­ÀÇ nginxÀÇ »ç¿ëÀº ¾à°£ÀÇ ¹®Á¦°¡ ÀÖ½À´Ï´Ù.

ù¹ø°´Â worker¸¦ ¿©·¯°³ ¼³Á¤ÇÏ¿´´õ¶óµµ ½ÇÁ¦·Î ÀÛ¾÷À» ÇÏ´Â ÇÁ·Î¼¼½º´Â 1°³ ¹Û¿¡ ¾ÈµÈ´Ù´Â Á¡.

µÎ¹ø°´Â php¿ÍÀÇ FastCGI¸¦ ÅëÇÑ ¿¬µ¿¿¡¼­ ¾ÆÆÄÄ¡¿Í lighttpd¿Í ´Þ¸® ÀÚü FastCGI ÇÁ·Î¼¼½º °ü¸®ÀÚ°¡ ¾ø±â ¶§¹®¿¡ ºÎ°¡ÀûÀÎ PHP Process Manager ¸¦ »ç¿ëÇØ¾ß Çϴµ¥ À¯¸íÇÑ php-fpm Àº Windows ȯ°æ¿¡¼­´Â Áö¿øµÇÁö ¾Ê±â ¶§¹®¿¡ ´Ù¸¥ ¹æ¹ýÀ» ã¾Æ¾ß ÇÕ´Ï´Ù.


ù¹ø° ¹®Á¦´Â nginxÀÇ Â÷±â ¼öÁ¤µÈ ¹öÀüÀ» ±â´Ù·Á¾ß ÇÏÁö¸¸, µÎ¹ø° ¹®Á¦ÀÇ °æ¿ì´Â ´ÙÇàÈ÷ ÇØ°á ¹æ¹ýÀÌ ÀÖÀ¸¸ç, ÀÌ ¹®Á¦¸¦ ÇØ°áÇϸé Áö±Ý °ÞÀ¸½Ã´Â ¹®Á¦¸¦ ÀÇ¿Ü·Î ½±°Ô ÇØ°áÇÏ½Ç ¼ö ÀÖÀ» °Ì´Ï´Ù.


ÇöÀç ´ç¿¬ÇÏ°ÚÁö¸¸ ¹æ°¡¿ö¿ä´ÔÀÇ °æ¿ì ´Ü ÇϳªÀÇ php-cgi.exe ÇÁ·Î¼¼½º¸¦ »ç¿ëÇÏ½Ã°í °è½ÇÅÙµ¥ ÀÌ·± °æ¿ì µ¿½Ã¿¡ 2°³ÀÇ php ÆäÀÌÁöÀÇ ¿äûÀÌ ÀÖÀ» °æ¿ì Â÷·Ê´ë·Î '1¿äû ó¸® ÈÄ ´ÙÀ½ ¿äû ó¸®' ½ÄÀ¸·Î ¿äûÀ» ó¸®ÇÒ °ÍÀÔ´Ï´Ù.

ÀÌ °æ¿ì ¹ß»ýµÇ´Â ¹®Á¦´Â ¿¹¸¦ µé¾î sleep(10); ±¸¹®ÀÌ µé¾îÀÖ´Â php ÆäÀÌÁö¸¦ ¿äûÇÑ °æ¿ì 10Ãʵ¿¾È ¾î¶°ÇÑ ¿äûµµ ¹Þ¾ÆµéÀÏ ¼ö ¾ø´Â ¹®Á¦°¡ ¹ß»ýÇÕ´Ï´Ù. ¶ÇÇÑ ºñÁ¤»óÀûÀÎ ¿äûÀ¸·Î php-cgi.exe ÇÁ·Î¼¼½º°¡ Á¾·áµÈ °æ¿ìµµ ´äÀÌ ¾ø¾îÁö°Ô µË´Ï´Ù.

ÀÌ ¹®Á¦¸¦ ÇØ°áÇϱâ À§ÇÏ¿© php-fpm°ú ºñ½ÁÇÑ ÇÁ·Î¼¼½º °ü¸®ÀÚ¸¦ ÇÊ¿ä·Î ÇÏ°Ô µÇ´Âµ¥, ÀÌ´Â spawn-fcgi ¶ó´Â lighttpd¿¡ ¿¹Àü¿¡ Æ÷ÇԵǾú´ø fastcgi ÇÁ·Î¼¼½º °ü¸®ÀÚ¸¦ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.

ÇöÀç´Â lighttpd¿¡¼­ ºÐ¸®µÇ¾î µû·Î ÇÁ·ÎÁ§Æ®°¡ ÁøÇàµÇ°í Àִµ¥ ȨÆäÀÌÁö´Â ´ÙÀ½°ú °°½À´Ï´Ù.

http://redmine.lighttpd.net/projects/spawn-fcgi/wiki

ÀÌ °÷¿¡¼­ Known issues ºÎºÐÀÇ ÅäÇÈÀ» º¸½Ã¸é windows ȯ°æ¿¡¼­ÀÇ ºôµå°¡ ºÒ°¡´ÉÇÏ´Ù´Â À̽´°¡ Àִµ¥ Á» ´õ ¾Æ·¡ÂÊÀ¸·Î ³»·Áº¸¸é windows ȯ°æ¿¡¼­ ºôµåÇÒ ¼ö ÀÖµµ·Ï ¼öÁ¤µÈ ¼Ò½ºÄÚµå¿Í ÄÄÆÄÀÏµÈ ¹ÙÀ̳ʸ®¸¦ ãÀ¸½Ç ¼ö ÀÖÀ¸½Ç °Ì´Ï´Ù.

¹Ù·Î ÄÄÆÄÀÏµÈ ¹ÙÀ̳ʸ®¸¦ »ç¿ëÇÏ¿© Àӽ÷ΠÀÏ´Ü »ç¿ëÀ» Çغ¸½Ã°í ÇöÀç ¿Ã¶ó¿ÍÀÖ´Â ¼Ò½ºÄÚµå¿Í ÄÄÆÄÀÏµÈ ¹ÙÀ̳ʸ®¸¦ ½ÇÁ¦·Î ÇÁ·Î¼¼½º °ü¸®¸¦ ÇÏÁö ¾Ê°í ´ÜÁö php-cgi.exe¿Í °°Àº FastCGI ÇÁ·Î¼¼½º¸¦ ¿©·¯°³ ¶ç¿ï ¼ö ÀÖ°Ô¸¸ ÇØÁÝ´Ï´Ù.

±×·¸Áö¸¸ ¼Ò½ºÄڵ带 Á¶±Ý¸¸ ¼öÁ¤ÇϽøé php-cgi.exe ÇÁ·Î¼¼½º°¡ Á¾·áµÇ°Ô µÇ¸é ¹Ù·Î ÀÚµ¿À¸·Î ´Ù½Ã »õ·Î¿î ÇÁ·Î¼¼½º¸¦ ½ÇÇàÇÏ°Ô²û ¼öÁ¤µµ °¡´ÉÇÕ´Ï´Ù.

±×¿¡ ´ëÇÑ ºÎºÐÀº ´ÙÀ½¿¡ ¼³¸íÇØ º¸µµ·Ï ÇÏ°Ú½À´Ï´Ù.
À§·Î
ÀÌÀü ±Û Ç¥½Ã:   
±Û ¾²±â   ´äº¯ ´Þ±â    Ä¿ÇǴнº, ½Ã½ºÅÛ ¿£Áö´Ï¾îÀÇ ½°ÅÍ °Ô½ÃÆÇ À妽º -> ½Ã½ºÅÛ ¼³Ä¡ ¹× ¿î¿µ ½Ã°£´ë: GMT + 9 ½Ã°£(Çѱ¹)
ÆäÀÌÁö 1 Áß 1

 
°Ç³Ê¶Ù±â:  
»õ·Î¿î ÁÖÁ¦¸¦ ¿Ã¸± ¼ö ¾ø½À´Ï´Ù
´ä±ÛÀ» ¿Ã¸± ¼ö ¾ø½À´Ï´Ù
ÁÖÁ¦¸¦ ¼öÁ¤ÇÒ ¼ö ÀÖ½À´Ï´Ù
¿Ã¸° ±ÛÀ» »èÁ¦ÇÒ ¼ö ¾ø½À´Ï´Ù
ÅõÇ¥¸¦ ÇÒ ¼ö ¾ø½À´Ï´Ù


Powered by phpBB © 2001, 2005 phpBB Group