Skip to content

Instantly share code, notes, and snippets.

@L1so
Created November 3, 2021 02:56
Show Gist options
  • Save L1so/e90702cb69496f7b0b8ba86411b9dfeb to your computer and use it in GitHub Desktop.
Save L1so/e90702cb69496f7b0b8ba86411b9dfeb to your computer and use it in GitHub Desktop.
Integrate php from source with apache2

Integrate php from source with apache2

Add following line to end of /etc/apache2/apache2.conf.

LoadModule php5_module  modules/libphp5.so
AddType application/x-httpd-php  .php

Restart apache.

sudo /etc/init.d/apache2 restart

Create info.php file

sudo sh -c 'echo "<?php phpinfo(); ?>" >> /var/www/info.php'

Navigate to your http://(domain_or_ip)/info.php, see if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment