404 Not Found Error when trying to access localhost on local LAMP server

前端 未结 5 2208
暗喜
暗喜 2021-01-06 10:33

I\'m running Ubuntu. My Apache2 default file looks like this:


        ServerAdmin webmaster@localhost

        DocumentRoot /var/www         


        
5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-06 11:02

    Do you have the PHP module installed and enabled? Because, normally, it would mention that in the server signature, but yours doesn't. That would also explain why the server doesn't recognize that index.php is what you mean by /.

    Try

    sudo a2enmod php5
    

提交回复
热议问题