![](/img/trans.png)
[英]codeigniter routes not working without index.php in live server inside default var/www/html folder
[英]LAMP server installaion failed.. localhost does not list directories like codeigniter when copied in var/www/html/
你需要這個:
apt-get install libapache2-mod-php5
sudo a2enmod php5
sudo service apache2 restart
或者(如果您已經安裝了那些)
AddType application/x-httpd-php .php
在Apache的配置文件中
除了Alex Tartan的答案,您還需要:
<FilesMatch "\\.phps$"> SetHandler application/x-httpd-php-source </FilesMatch>
在您的php5.conf
這樣可以代替提供index.html文件等。它將提供index.php文件。
參見: https : //serverfault.com/questions/286882/apache-is-not-interpreting-php-files
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.