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