Apache 在ubuntu服务器16.04上部署php应用程序

Apache 在ubuntu服务器16.04上部署php应用程序,apache,.htaccess,apache2,ubuntu-16.04,Apache,.htaccess,Apache2,Ubuntu 16.04,我正在尝试将我的应用程序部署到数字海洋水滴Ubuntu 16.04上 当我访问网站(example.com)时,它显示index.php的内容 虚拟主机文件如下所示: ServerName example.com ServerAlias www.example.com DocumentRoot /var/www/myproject DirectoryIndex index.php <Directory /var/www/myproject> AllowOv

我正在尝试将我的应用程序部署到数字海洋水滴Ubuntu 16.04上

当我访问网站(example.com)时,它显示index.php的内容

虚拟主机文件如下所示:

  ServerName example.com
  ServerAlias www.example.com
  DocumentRoot /var/www/myproject
  DirectoryIndex index.php

  <Directory /var/www/myproject>
   AllowOverride All
   Allow from All
  </Directory>
ServerName example.com
ServerAlias www.example.com
DocumentRoot/var/www/myproject
DirectoryIndex.php
允许超越所有
通融

你知道如何解决这个问题吗?

如果你看到文件的内容“也许这会有帮助: