我在Apache / Ubuntu 14.04上有一个Web应用程序,该应用程序运行良好,直到我将服务器升级到Ubuntu 18.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>
我还比较了具有14.04和18.04的服务器中的apache模块,它们是相同的。
这是虚拟主机文件。
<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>
我确实将此添加到了vhost文件中并重新启动了apache,但id无效。
AddHandler php5-script .php .asp .aspx .ascx .ashx .asmx .pl
AddType text/html .php .asp .aspx .ascx .ashx .asmx .pl
apache日志中没有错误