browser downloads php file from apache web server

后端 未结 3 665
隐瞒了意图╮
隐瞒了意图╮ 2021-01-17 23:43

I have an apache web server. Let\'s say this server\'s domain is example.com.

When I access example.com, then the index.php file is co

3条回答
  •  情书的邮戳
    2021-01-18 00:29

    Hope this saves someone else the headache. I know this question is old, but it still comes up when searching for this problem.

    I'm not sure if this works across all installations of apache2, but I am running apache2 on ubuntu and had the problem of my web browser downloading files instead of displaying the correct index file.

    The problem lies in the file /etc/apache2/mods-enabled/dir.conf The default document setting here was overriding what I had set in /etc/apache2/httpd.conf

    So just open up /etc/apache2/mods-enabled/dir.conf and change the order of the files listed.

    :)

提交回复
热议问题