awslamp

Run a custom PHP script

Add your PHP script to the /opt/bitnami/apache/htdocs/ directory, then browse to it via the URL http://SERVER-IP/FILENAME.php, where FILENAME is the name of the PHP script.

For an example, refer to the section on using phpinfo.

NOTE: If your script file is named index.php, then you must access it using the URL http://SERVER-IP/index.php and not http://SERVER-IP. This is because the Apache server included in the AMP stack is configured to recognize both index.html and index.php files by default, but to give the included index.html file priority. To alter this behaviour, simply move the /opt/bitnami/apache/htdocs/index.html file to a different location.

Last modification December 21, 2022