Question

App Platform: No matching DirectoryIndex

I’ve setup a new App to host my Symfony project. The app has built fine and files are located in /workspace/ but when trying to access the app I receive a 403 and logs show Cannot serve directory /workspace/: No matching DirectoryIndex (index.php,index.html,index.htm) found, and server-generated directory index forbidden by Options directive.

I believe this is because the index.php for Symfony is within /workspace/public/ but I cannot see how to update the config for this, I also can’t see a way to gain root access to look further into the configuration.

How would I resolve this?


Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
March 19, 2023

Hi there,

Indeed the DigitalOcean App Platform does not come with root access, if you want to have root access you could go with a Droplet instead:

https://www.digitalocean.com/products/droplets

Regarding the issue that you are seeing, I believe that you should be able to update your App Platform run the command heroku-php-apache2 workspace/public/ so that the web server itself will be started with the correct document root.

Here is an example PHP project that you could reference:

https://github.com/thedevdojo/wave/blob/main/.do/deploy.template.yaml

It is based on Laravel but the approach should be similar.

Let me know how it goes!

Best,

Bobby