vi /etc/php5/apache2/php.ini ```
service apache2 restart ``` 2. 將Apache預設編碼設為UTF-8,避免網頁錯誤訊息為亂碼 ``` vi /etc/apache2/conf-available/charset.conf ``` 3. 檢查 /etc/apache2/sites-enabled/000-default.conf ``` ServerAdmin webmaster@localhost DocumentRoot /var/www Options FollowSymLinks AllowOverride All Options Indexes FollowSymLinks MultiViews AllowOverride All #Order allow,deny #allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all ``` 儲存後,重新啟動Apache即可 ``` service apache2 restart ```
vi /etc/apache2/conf-available/charset.conf ``` 3. 檢查 /etc/apache2/sites-enabled/000-default.conf ``` ServerAdmin webmaster@localhost DocumentRoot /var/www Options FollowSymLinks AllowOverride All Options Indexes FollowSymLinks MultiViews AllowOverride All #Order allow,deny #allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all ``` 儲存後,重新啟動Apache即可 ``` service apache2 restart ```
ServerAdmin webmaster@localhost DocumentRoot /var/www Options FollowSymLinks AllowOverride All Options Indexes FollowSymLinks MultiViews AllowOverride All #Order allow,deny #allow from all ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all ``` 儲存後,重新啟動Apache即可 ``` service apache2 restart ```
service apache2 restart ```