Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache URL希望我下载一个文件_Apache - Fatal编程技术网

Apache URL希望我下载一个文件

Apache URL希望我下载一个文件,apache,Apache,我在Apache/Ubuntu14.04上有一个web应用程序,在我将服务器升级到Ubuntu18.04之前一直运行良好。现在,当我访问该网站时,它会自动要求我下载一个文件。它要下载的文件是web应用程序的启动页面。该文件名为index.asp。我确实启用了dir模块 <IfModule mod_dir.c> DirectoryIndex index.asp index.html index.cgi index.pl index.php index.xhtml index.h

我在Apache/Ubuntu14.04上有一个web应用程序,在我将服务器升级到Ubuntu18.04之前一直运行良好。现在,当我访问该网站时,它会自动要求我下载一个文件。它要下载的文件是web应用程序的启动页面。该文件名为index.asp。我确实启用了dir模块

<IfModule mod_dir.c>
    DirectoryIndex index.asp index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>

Ubuntu 14.04上的apache日志中没有错误

您可能有PHP5.x,现在有了?确保安装并启用了正确的PHP模块,并在Apache配置中使用了正确的指令。相关:这个index.asp实际上是一个perl脚本。在安装php7之后,我现在看到的不是下载,而是源代码。
<VirtualHost _default_:443>
ServerName xxxxxxxx.net
ServerAlias xxxxxxx.net

DocumentRoot /home/computer/xxx/xxxxxx/htdocs

<Directory /home/xxxxx/xxxxx/xxxxx/htdocs>
  Options -Indexes +ExecCGI +FollowSymLinks
  Require all granted
</Directory>
AddHandler php5-script  .php .asp .aspx .ascx .ashx .asmx .pl
AddType text/html .php .asp .aspx .ascx .ashx .asmx .pl