You can also just drop an empty composer.json
into your project to make Heroku treat your project as a PHP project.
The preference of index.php
over index.html
comes from the default DirectoryIndex
directive that Apache uses on Heroku; it has nothing to do with your browser. To change it, you could drop a .htaccess
with DirectoryIndex index.html
into your application.
If you just want raw performance for your static site, it's also probably a good idea to use Nginx. The default configuration should be reasonable for your purposes so add a Procfile
with web: vendor/bin/heroku-php-nginx
to your project along with an empty composer.json
(and no index.php
) and you're good to go.
Also see https://devcenter.heroku.com/articles/php-support and https://devcenter.heroku.com/articles/custom-php-settings for more details.