Ôõô¿´nginxÊÇ·ñÆô¶¯
ÒªÉó²é nginx ÊÇ·ñÒÑÆô¶¯£¬¿ÉʹÓÃÒÔÏ°취£ºÍ¨¹ý systemctl ÏÂÁî¼ì²é״̬£ºsystemctl status nginx¼ì²éÉèÖò¢Éó²é nginx ÊÇ·ñÕýÔÚÔËÐУºnginx -t¼ì²é nginx ÊÇ·ñ¼àÌý¶Ë¿Ú 80£ºnetstat -plnt | grep nginx
ÔõÑùÉó²é Nginx ÊÇ·ñÒÑÆô¶¯£¿
ÒªÉó²é Nginx ÊÇ·ñÒÑÆô¶¯£¬Çëƾ֤ÒÔÏ°취²Ù×÷£º
ʹÓà systemctl ÏÂÁî
ÔÚÖÕ¶ËÖÐÔËÐÐÒÔÏÂÏÂÁ
systemctl status nginx
µÇ¼ºó¸´ÖÆ
Êä³öÚ¹ÊÍ£º
ÈôÊÇ Nginx ÕýÔÚÔËÐУ¬Êä³ö½«ÏÔʾ “Active: active (running)”¡£
ÈôÊÇ Nginx δÔËÐУ¬Êä³ö½«ÏÔʾ “Active: inactive (dead)”¡£
ʹÓà nginx -t ÏÂÁî
ÔÚÖÕ¶ËÖÐÔËÐÐÒÔÏÂÏÂÁ
nginx -t
µÇ¼ºó¸´ÖÆ
Êä³öÚ¹ÊÍ£º
ÈôÊÇ Nginx ÉèÖÃ׼ȷ²¢ÕýÔÚÔËÐУ¬Êä³ö½«ÏÔʾ “the configuration file /etc/nginx/nginx.conf syntax is ok”¡£
ÈôÊÇ Nginx ÉèÖ÷ºÆðÎÊÌ⣬Êä³ö½«ÏÔʾ¹ýʧÐÂÎÅ¡£
ʹÓà netstat ÏÂÁî
ÔÚÖÕ¶ËÖÐÔËÐÐÒÔÏÂÏÂÁ
netstat -plnt | grep nginx
µÇ¼ºó¸´ÖÆ
Êä³öÚ¹ÊÍ£º
ÈôÊÇ Nginx ÕýÔÚ¼àÌý¶Ë¿Ú 80£¬Êä³ö½«ÏÔʾ “tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN”¡£
ÈôÊÇ Nginx δÔÚ¶Ë¿Ú 80 ÉϼàÌý£¬ÔòÊä³ö½«Îª¿Õ¡£
ÒÔÉϾÍÊÇÔõô¿´nginxÊÇ·ñÆô¶¯µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡