nginxÔõô²é°æ±¾
¿ÉÒÔÅÌÎÊ nginx °æ±¾µÄÒªÁìÓУºÊ¹Óà nginx -v ÏÂÁÉó²é nginx.conf ÎļþÖÐµÄ version Ö¸Á·¿ª nginx ¹ýʧҳ£¬Éó²éÒ³ÃæµÄÎÊÌâ¡£
ÔõÑùÅÌÎÊ Nginx °æ±¾
Nginx ÊÇÒ»¿îÊ¢ÐÐµÄ Web ЧÀÍÆ÷£¬ÅÌÎÊÆä°æ±¾¹ØÓÚ½â¾öÎÊÌâ¡¢¼à¿ØÐÔÄÜ»òÍýÏëÉý¼¶ºÜÊÇÖ÷Òª¡£ÒÔÏÂÏÈÈݼ¸ÖÖÅÌÎÊ Nginx °æ±¾µÄÒªÁ죺
1. ʹÓÃÏÂÁîÐÐ
¿ÉÒÔͨ¹ýÏÂÁîÐÐʹÓà nginx -v ÏÂÁîÉó²é Nginx °æ±¾£º
$ nginx -v
µÇ¼ºó¸´ÖÆ
¸ÃÏÂÁÊä³öÓÐ¹Ø Nginx °æ±¾ºÍ±àÒëÑ¡ÏîµÄÐÅÏ¢£¬ÀýÈ磺
nginx version: nginx/1.19.10 built with OpenSSL 1.1.1l 24 Aug 2021 TLS SNI support enabled
µÇ¼ºó¸´ÖÆ
2. Éó²éÉèÖÃÎļþ
Nginx ÉèÖÃÎļþͨ³£°üÀ¨ÓÐ¹Ø Nginx °æ±¾µÄÐÅÏ¢¡£·¿ªÉèÖÃÎļþ£¬Í¨³£Î»ÓÚ /etc/nginx/nginx.conf£¬²¢ËÑË÷ version Ö¸Á
user nginx; worker_processes 1; error_log /var/log/nginx/error.log notice; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; version: nginx/1.19.10; ...
µÇ¼ºó¸´ÖÆ
3. ʹÓà Nginx ¹ýʧҳ
ÈôÊÇ Nginx ÉèÖÃΪÏÔʾ¹ýʧҳ£¬Ôò¿ÉÒÔÔÚä¯ÀÀÆ÷Öз¿ª¹ýʧҳÒÔÉó²é°æ±¾ÐÅÏ¢¡£¹ýʧҳµÄÎÊÌâͨ³£°üÀ¨ Nginx °æ±¾£º
·¿ªä¯ÀÀÆ÷²¢ÊäÈëÒÔÏ URL£ºhttp://your_domain/nginx_status
²éÕÒÒ³ÃæÎÊÌ⣬ͨ³£Îª nginx/1.19.10 Ö®ÀàµÄÄÚÈÝ
ÒÔÉϾÍÊÇnginxÔõô²é°æ±¾µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡