Installing Apache2.4, PHP7.1 on FreeBSD
1.Install and configure Apache 2.4 Let's install Apache 2.4 first. please refer to this link . 2.Install and configure PHP 7.1 $ sudo pkg install mod_php71 Updating FreeBSD repository catalogue... FreeBSD repository is up to date. All repositories are up to date. The following 1 package(s) will be affected (of 0 checked): New packages to be INSTALLED: mod_php71: 7.1.12 Number of packages to be installed: 1 The process will require 4 MiB more space. 1 MiB to be downloaded. Proceed with this action? [y/N]: y [1/1] Fetching mod_php71-7.1.12.txz: 100% 1 MiB 1.2MB/s 00:01 Checking integrity... done (0 conflicting) [1/1] Installing mod_php71-7.1.12... Extracting mod_php71-7.1.12: 100% [activating module `php7' in /usr/local/etc/apache24/httpd.conf] Message from mod_php71-7.1.12: *************************************************************** Make sure index.php is part of your DirectoryIndex. You should add the following to your Apache configuration file: ...