With Apache, the first configured site will handle any requests that don't ask for an explicit host. This includes requests going to a URL using an IP address.
You should be able to just enable the default site and then put the files you want to serve in the directory specified as its DocumentRoot (often this is /var/www/html, but it depends on the distribution). So if you put index.php in the DocumentRoot, people would be able to access it at
http://12.34.56.78/index.php where they'd substitute your actual IP address.