0

I have a web application on Apache/Ubuntu 14.04 that was running fine until I upgraded the server to Ubuntu 18.04. Now when I visit the site, It automatically asks me to download a file. The file that it wants to download is the launch page of the web application. The file is called index.asp. I do have the dir module enabled.

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

I also compared the apache modules from the server that has 14.04 to the 18.04 and they are identical.

Here is the vhost file.

<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>

I did add this to the vhost file and restarted apache but id didn't work.

AddHandler php5-script  .php .asp .aspx .ascx .ashx .asmx .pl
AddType text/html .php .asp .aspx .ascx .ashx .asmx .pl

No errors in the apache logs

BioRod
  • 529
  • 1
  • 5
  • 19
  • On Ubuntu 14.04 you probably had PHP 5.x and now you have [PHP 7.2](https://packages.ubuntu.com/bionic/php)? Make sure you have the correct PHP modules installed and enabled and the correct directives in your Apache configs. Related: [php 7 file is downloaded instead instead of executing](https://stackoverflow.com/questions/34244798/php-7-file-is-downloaded-instead-instead-of-executing) – Freddy Feb 28 '20 at 17:44
  • This index.asp is actually a perl script. After installing php7, instead of downloading, I now see the source code. – BioRod Mar 01 '20 at 13:31

0 Answers0