By BubbaGump
I believe I saw something whilst searching that you can use NGINX instead of Apache on a Web Service in the DigitalOcean App Platform by adding an nginx.conf file to the root of a project. Despite efforts searching, I can’t find it again, and there’s nothing in the documentation either that I can find.
I tried switching out:
heroku-php-apache2 public/
for:
heroku-php-nginx public/
But the build failed and rolled back. No idea why as the logs provide no more information other than to say it’s failed and rolled back.
In addition to running NGINX thought, as said, I’d also like to be able to have more granular control and the ability to customise the NGINX config. Is this possible?
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!
For the level of control you’re looking for, I’d recommend using a Dockerfile. You can find an example of a PHP Apache Dockerfile on the PHP Project’s Docker Hub page. To use a Dockerfile with App Platform, simply put the Dockerfile in the root of your github project before creating the App Platform app.
If you need to put the file in a subdirectory, or want to add a Dockerfile to an existing project, add the dockerfile_path parameter to your App Spec and apply the changes via doctl or the API.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.