×ðÁú¿­Ê±¹ÙÍøµÇ¼

apacheÔõôɾ³ý¶àÓÚµÄЧÀÍÆ÷Ãû

Òª´Ó apache ÖÐɾ³ý¶àÓàµÄ servername Ö¸Áî £¬¿ÉÒÔ½ÓÄÉÒÔÏ°취£ºÊ¶±ð²¢É¾³ý¶àÓàµÄ servername Ö¸Áî¡£ÖØÐÂÆô¶¯ apache ʹ¸ü¸ÄÉúЧ¡£¼ì²éÉèÖÃÎļþÑéÖ¤¸ü¸Ä¡£²âÊÔЧÀÍÆ÷È·±£ÎÊÌâÒѽâ¾ö¡£

ÔõÑù´Ó Apache ÖÐɾ³ý¶àÓàµÄ ServerName Ö¸Áî

Apache ÖеĶàÓà ServerName Ö¸Áî¿ÉÄܻᵼÖÂЧÀÍÆ÷¹ýʧ»òÉèÖÃÎÊÌ⡣Ҫɾ³ýÕâЩ¶àÓàµÄÖ¸Áî £¬Çëƾ֤ÒÔÏ°취²Ù×÷£º

1. ʶ±ð¶àÓàµÄ ServerName Ö¸Áî

·­¿ª Apache ÉèÖÃÎļþ£¨Í¨³£ÊÇ /etc/apache2/apache2.conf »ò /etc/httpd/conf/httpd.conf£©¡£ËÑË÷ ServerName Ö¸Áî £¬²¢È·¶¨ÒªÉ¾³ýµÄ¶àÓàÖ¸Áî¡£

2. ɾ³ý¶àÓàµÄÖ¸Áî

ʹÓÃÎı¾±à¼­Æ÷»òÏÂÁîÐй¤¾ßɾ³ý¶àÓàµÄ ServerName Ö¸Áȷ±£Ö»É¾³ý¶àÓàµÄÖ¸Áî £¬²»È»¿ÉÄÜ»áÓ°ÏìЧÀÍÆ÷µÄÕý³£ÔËÐС£

3. ÖØÐÂÆô¶¯ Apache

¶ÔÉèÖþÙÐиü¸Äºó £¬±ØÐèÖØÐÂÆô¶¯ Apache ÒÔʹ¸ü¸ÄÉúЧ¡£Ê¹ÓÃÒÔÏÂÏÂÁîÖØÐÂÆô¶¯ Apache£º

Ubuntu/Debian£ºsudo systemctl restart apache2

CentOS/Red Hat£ºsudo systemctl restart httpd

macOS£ºsudo apachectl restart

4. ÑéÖ¤¸ü¸Ä

ÖØÐÂÆô¶¯ Apache ºó £¬Ê¹ÓÃÒÔÏÂÏÂÁî¼ì²éÉèÖÃÎļþÖеĸü¸Ä£º

grep -i "servername" /etc/apache2/apache2.conf

µÇ¼ºó¸´ÖÆ

ÕâÓ¦½öÏÔʾĿ½ñʹÓÃµÄ ServerName Ö¸Áî¡£

5. ²âÊÔЧÀÍÆ÷

»á¼ûÍøÕ¾ÒÔ²âÊÔ¸ü¸Ä¡£ÈôÊÇÄú֮ǰÓöµ½Ð§ÀÍÆ÷¹ýʧ»òÉèÖÃÎÊÌâ £¬ÕâЩÎÊÌâÏÖÔÚÓ¦¸ÃÒѽâ¾ö¡£

ÒÔÉϾÍÊÇapacheÔõôɾ³ý¶àÓÚµÄЧÀÍÆ÷ÃûµÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ