[英]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.