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?
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!
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.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
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:
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 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