Apache broken after update of system

I recently updated my system from 14.04 to ubuntu 16.04
Now after this update my apache would not start at all.
After some research i found out 16.04 requires php 7.
On installing php7 now apache has started working but my website just leads to random file downloads out of no where.
It does not at all point to the desired location.
Now my system is completely down.
Please see if someone could help me out with this.

Regards,
Ronak Shah

Howdy,

You may want to try disabling mod_php, or at least looking at the PHP configs located in /etc/apache2/mods-enabled to see if there are any “SetHandler” lines in there… if so you’d want to comment those out.

-Eric

I tried disabling mod_php, but on doing that my apache server stops running, it gives an error while trying to restart. On re-enabling it the server then restarts perfectly.

Same errror on commenting the SetHandler lines in php7.0.conf in there.

Error shown is:
Job for apache2.service failed because the control process exited with error code. See “systemctl status apache2.service” and “journalctl -xe” for details.

On removing the commets, apache now restarts perfectly.

Solved the error, it was silly on my part to comment using // in the .conf file
The same file i commented the SetHandler files using # and everything works perfectly now.

Thank you Eric.