¶þ¡¢°²×°phpmyadmin£ºÍ¬ÑùÔÚÐÂÁ¢µÃÖÐËÑË÷phpmyadmin£¬È»ºó°²×°
Èý¡¢ÆôÓà mod_rewrite Ä£¿é£ºsudo a2enmod rewrite
ËÄ¡¢ÅäÖà apache2.conf£ºsudo gedit /etc/apache2/apache2.conf
È¥µô AddHandler cgi-script .cgi ǰµÄ×¢ÊÍ ¡°#¡±£¨ÓÐÁ½¸ö#£©¡£
È»ºóÔÚÈÎÒâµØ·½Ìí¼ÓÕâôһ¶Î£º
DocumentRoot /var/www/
Options FollowSymLinks
AllowOverride all
Options ExecCGI
¶ÔNickyµÄ²¹³ä£º»¹ÒªÔÙ¼ÓÉÏÒ»¾ä£ºServerName
* Forcing reload of apache 2.0 web server...
apache2: Could not determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
Îå¡¢ÖØÆô·þÎñÆ÷£ºsudo /etc/init.d/apache2 restart
OKÁË£¡
Nicky£º
˵Ã÷£ºPHP ³ÌÐò·Å /var/www/ ÏÂÃæ¶¼¿ÉÒÔ£¬CGI ³ÌÐò·Å /var/www/cgi-bin/ ÏÂÃæ¡£
ÊDz»ÊÇÌ«¼òµ¥ÁË£¬³ýÈ¥ÏÂÔØµÄʱ¼ä£¬Òª²»ÁËÒ»·ÖÖӾͿÉÒÔÍê³ÉÅäÖã¬ÔÚ Ubuntu ÉÏ»¹ÐèÒª APM °üÂ𣿻¹ÊǼÇסÒÔϼ¸¸öÃüÁîºÍλÖþÍÐÐÁË¡£
sudo /etc/init.d/apache2 restart £¨ÖØÆô apache£©
sudo gedit /etc/php5/apache2/php.ini £¨ÅäÖà php.ini£©
sudo gedit /etc/apache2/apache2.conf £¨ÅäÖà apache2.conf£©
/var/www/£¨Ö÷Ŀ¼λÖã©
ÒÔÉÏ·þÎñÆ÷ÅäÖ㬾²âÊÔ¿ÉÒÔÕý³£ÔËÐÐ WordPress¡¢Habari¡¢Movable Type ¡£
Õâô°²×°ÍêÒÔºóÓÃhttp://localhost/phpmyadmin¿ÉÒÔ·ÃÎÊphpmyadmin£¬µ«ÎÞ·¨·ÃÎÊhttp://localhost£¬Ö»¿ÉÒÔÓÃIP·ÃÎÊ£¨ÄÚÍøIP£©£¬127.0.0.1Ò²²»ÐС£Èçhttp://192.168.1.5 ·ÃÎÊ
¸Õ²Å°ÑwindowϵÄÒ»¸öÎļþ¼ÐxiaoneiÒÆµ½var/wwwÏ£¬µ«ÊÇÓÃhttp://localhost/xiaonei/index.html»òÕßhttp://192.168.1.5/xiaonei/index.html»áÌáʾ
Forbidden
You don't have permission to access / on this server.
°ÑÎļþ¼ÐºÍÀïÃæÎļþµÄȨÏÞÈ«²¿¸ÄΪrootÇÒ¡°¶Áд¡±¾Í¿ÉÒÔÁË(ÓÃhttp://localhost/xiaonei/index.html»òÕßhttp://192.168.1.5/xiaonei/index.html¶¼Ã»ÓÐÎÊÌ⣬µ«http://localhostºÍhttp://localhost/xiaoneiÈÔÈ»Ìáʾforbidden£©