apache²»¿ÉÆô¶¯Ôõô½â¾ö
apache ÎÞ·¨Æô¶¯µÄ¹ÊÕÏɨ³ý
µ± Apache ÎÞ·¨Æô¶¯Ê±£¬¿ÉÄÜÊÇÓÉÓÚÒÔÏÂÔµ¹ÊÔÓÉÖ®Ò»£º
1. Óï·¨¹ýʧ
¼ì²é Apache µÄÉèÖÃÎļþ (httpd.conf) ÊÇ·ñÓÐÓï·¨¹ýʧ¡£
ʹÓÃÏÂÁî apachectl configtest ¼ì²éÉèÖÃÎļþ¡£
2. ¶Ë¿Ú³åÍ»
È·±£ Apache ûÓÐÓëÆäËûÓ¦ÓóÌÐòʹÓÃÏàͬµÄ¶Ë¿Ú¡£
ÔËÐÐ netstat -na | grep :80 À´Éó²é¶Ë¿Ú 80 ÊÇ·ñ±»Õ¼Óá£
3. ȨÏÞÎÊÌâ
È·±£ Apache Óû§ºÍ×éÓµÓжÔÈÕÖ¾ÎļþºÍĿ¼µÄ¶ÁдȨÏÞ¡£
ÔËÐÐ chown -R apache:apache /var/log/apache2 ºÍ chmod -R 775 /var/log/apache2¡£
4. ÄÚ´æȱ·¦
ÔöÌí Apache ·ÖÅɵÄÄÚ´æ¡£
ÔÚ httpd.conf ÖУ¬ÕÒµ½ MaxClients ºÍ ServerLimit Ö¸ÁîºÍÔöÌíÆäÖµ¡£
5. Àú³ÌËÀËø
Éó²é Apache ÈÕÖ¾ (/var/log/apache2/error.log) ÒÔ²éÕÒÓйØËÀËøµÄÐÅÏ¢¡£
ʵÑéÖØÐÂÆô¶¯ Apache¡£
6. ÊØ»¤Àú³Ì¹ÊÕÏ
È·±£ Apache ÊØ»¤Àú³ÌÕýÔÚÔËÐС£
ÔËÐÐ systemctl status apache2 À´¼ì²éÆä״̬¡£
7. SELinux ÎÊÌâ
ÈôÊÇÆôÓà SELinux£¬ÇëÈ·±£ Apache ¾ßÓлá¼ûÐëÒªµÄĿ¼ºÍÎļþËùÐèµÄȨÏÞ¡£
¿ÉÒÔʹÓà setsebool -P httpd_can_network_connect on À´ÆôÓÃÍøÂçÅþÁ¬¡£
8. ·À»ðǽÎÊÌâ
È·±£·À»ðǽÔÊÐí¶Ë¿Ú 80 ºÍ 443 µÄ´«ÈëÅþÁ¬¡£
ÔËÐÐ firewall-cmd –list-all À´¼ì²é·À»ðǽ¹æÔò¡£
9. Èí¼þ³åÍ»
¼ì²éϵͳÖÐÊÇ·ñÓÐÆäËû Web ЧÀÍÆ÷»òÓë Apache ³åÍ»µÄÓ¦ÓóÌÐò¡£
ʵÑéжÔØ»ò½ûÓÃÕâЩӦÓóÌÐò¡£
ÒÔÉϾÍÊÇapache²»¿ÉÆô¶¯Ôõô½â¾öµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡