How to setup Apache2 with an PHP7 installation?

Posted April 19, 2015 62.3k views

I followed a small guide on how to install PHP7 (
The installation went successful but could someone give some advice on how to use PHP in combination with Apache (Setting up servers isn’t my thing haha)? I couldn’t find anything about how to setup PHP7 with Apache2 which makes sense since the official release is still a few months away.
But I would like to do some testing with it :)

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

A quick search found this guide which should assist you in getting PHP 7 working with Apache on Ubuntu.

Hi Mike,

All DigitalOcean servers managed by ServerPilot have PHP 7 available by default. There’s nothing you need to customize, it’s part of the standard server configuration which uses Apache behind Nginx.