I’m trying to change the document root when deploying a PHP app on the app platform.

I’ve tried committing a Procfile with:

web: heroku-php-apache2 docs/

..in order to change the doc root to docs/

(as per heroku docs on the topic)

It gets picked up during the deployment but doesn’t seem to take effect when running the app.

Any tips?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi,

Adding the directory to the command like you did is the right way to set the document root. The Run Command that is set in the component settings will override any run commands that are detected during the build process. It sounds even though your updated your Procfile, the run command is still set to the old one which was picked up when you first created your app.

You can update the run command in the Components tab on the app’s control panel page.

Submit an Answer