nginx°æ±¾ÔõôÉó²é
ÒªÉó²é nginx °æ±¾£¬¿ÉÒÔʹÓÃÁ½ÖÖÒªÁ죺ÔÚÏÂÁîÐÐÖÐʹÓà “nginx -v” ÏÂÁî¡£Éó²é nginx ÉèÖÃÎļþ nginx.conf Öеİ汾ÐÅÏ¢¡£
ÔõÑùÉó²é Nginx °æ±¾
Nginx ÊÇÒ»¸öÇáÁ¿¼¶¡¢¸ßÐÔÄÜµÄ Web ЧÀÍÆ÷£¬ÆÕ±éÓÃÓÚÖÖÖÖÍøÕ¾ºÍÓ¦ÓóÌÐò¡£Ïàʶ Nginx µÄ°æ±¾¹ØÓÚ½â¾öÎÊÌâ¡¢Éý¼¶»ò×°Öø½¼ÓÄ£¿éºÜÊÇÖ÷Òª¡£
ÒªÁìÒ»£ºÊ¹ÓÃÏÂÁîÐÐ
×î¼òÆÓµÄÒªÁìÊÇʹÓÃÏÂÁîÐÐÉó²é Nginx °æ±¾£º
nginx -v
µÇ¼ºó¸´ÖÆ
¸ÃÏÂÁ´òÓ¡³ö Nginx µÄ°æ±¾ÐÅÏ¢£¬ÀýÈ磺
nginx version: nginx/1.21.6
µÇ¼ºó¸´ÖÆ
ÒªÁì¶þ£ºÉó²é Nginx ÉèÖÃÎļþ
nginx.conf ÉèÖÃÎļþÖÐÒ²°üÀ¨ Nginx °æ±¾ÐÅÏ¢¡£Ä¬ÈÏÇéÐÎÏ£¬nginx.conf λÓÚ /etc/nginx Ŀ¼ÖС£·¿ª¸ÃÎļþ²¢ÕÒµ½ÒÔÏÂÐУº
worker_processes 1; # worker_rlimit_nofile limit; # events { ... } user nginx; # pid /var/run/nginx.pid; worker_connections 1024;
µÇ¼ºó¸´ÖÆ
ÔÚ¸ÃÐÐÉÏ·½£¬Äú½«¿´µ½ÀàËÆÒÔϵÄÄÚÈÝ£º
# nginx version: nginx/1.21.6
µÇ¼ºó¸´ÖÆ
ÕâÌåÏÖÄúÕýÔÚÔËÐÐ Nginx °æ±¾ 1.21.6¡£
ÒÔÉϾÍÊÇnginx°æ±¾ÔõôÉó²éµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡