linuxÔõô°²ÅÅwebÏîÄ¿
ÔÚ linux ÉÏ°²ÅÅ web ÏîÄ¿ÐèÒªÒÔÏ°취£º×¼±¸ÇéÐΣº×°Öà web ЧÀÍÆ÷£¨Èç apache »ò nginx£©¡¢php¡¢mysql µÈ¡£°²ÅÅÏîÄ¿£º½«ÏîÄ¿Îļþ¸´ÖƵ½ web ¸ùĿ¼£¬ÉèÖà web ЧÀÍÆ÷Ö¸ÏòÏîĿĿ¼£¬²¢ÉèÖà php¡£ÉèÖà web ЧÀÍÆ÷£º¹ØÓÚ apache ±à¼ 000-default.conf ²¢Ö¸ÏòÏîĿĿ¼£¬¹ØÓÚ nginx ½¨ÉèÐÂÉèÖÃÎļþ²¢Á´½Óµ½ /etc/nginx/sites-enabled¡£²âÊÔ°²ÅÅ£º»á¼ûÏîÄ¿ url ¼ì²éÒ³Ãæ¼ÓÔØÊÇ·ñ׼ȷ£¬¹¦Ð§ÊÇ·ñÕý³£ÊÂÇé¡£
Linux ÉÏ°²ÅÅ Web ÏîÄ¿
µÚÒ»²½£º×¼±¸ÇéÐÎ
È·±£ÒÑ×°Öà Apache »ò Nginx Web ЧÀÍÆ÷¡£
×°Öà PHP¡¢MySQL ÒÔ¼°ÆäËûÐëÒªµÄÈí¼þ°ü£¨Ïêϸȡ¾öÓÚÏîÄ¿£©¡£
µÚ¶þ²½£º°²ÅÅÏîÄ¿
½«ÏîÄ¿Îļþ¸´ÖƵ½ Web ¸ùĿ¼£¨Í¨³£Îª /var/www/html£©¡£
ÉèÖà Web ЧÀÍÆ÷ÒÔÖ¸ÏòÏîĿĿ¼¡£
ÉèÖà PHP£¨ÈôÓÐÐëÒª£©ÒÔ´¦Öóͷ£ .php Îļþ¡£
ÈôÊÇʹÓÃÊý¾Ý¿â£¬ÇëÉèÖà MySQL£¨»òÆäËûÊý¾Ý¿âЧÀÍÆ÷£©²¢µ¼ÈëÐëÒªµÄÊý¾Ý¡£
µÚÈý²½£ºÉèÖà Web ЧÀÍÆ÷
¹ØÓÚ Apache£º
±à¼ /etc/apache2/sites-available/000-default.conf£¬½« DocumentRoot Ö¸ÏòÏîĿĿ¼¡£
ÖØÐÂÆô¶¯ Apache£ºsystemctl restart apache2¡£
¹ØÓÚ Nginx£º
ÔÚ /etc/nginx/sites-available ½¨ÉèÒ»¸öеÄÉèÖÃÎļþ£¬²¢Ö¸¶¨ÏîĿĿ¼Ϊ¸ùĿ¼¡£
½«ÐµÄÉèÖÃÎļþÁ´½Óµ½ /etc/nginx/sites-enabled£ºln -s /etc/nginx/sites-available/your-site.conf /etc/nginx/sites-enabled/
ÖØÐÂÆô¶¯ Nginx£ºsystemctl restart nginx¡£
µÚËIJ½£º²âÊÔ°²ÅÅ
ʹÓà Web ä¯ÀÀÆ÷»á¼û Web ÏîÄ¿µÄ URL¡£
¼ì²éÊÇ·ñ׼ȷ¼ÓÔØÒ³Ã棬²¢ÇÒËùÓй¦Ð§¶¼ÄÜÕý³£ÊÂÇé¡£
ÈôÊÇ·ºÆðÈκÎÎÊÌ⣬Çë¼ì²é Web ЧÀÍÆ÷ºÍÏîÄ¿ÉèÖÃÈÕÖ¾¡£
ÒÔÉϾÍÊÇlinuxÔõô°²ÅÅwebÏîÄ¿µÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡