Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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.
Accepted Answer
If the backend (API) is using PHP, you’d need to set a location block for PHP as you did in the first. All location blocks are specific to the server block they’re contained within – they’re not global or shared across other server blocks.
You’ll need to copy:
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
And paste that below:
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$query_string;
}
… on the second server block and then run:
nginx -t
… to test the configuration (always recommended before doing a restart). If all looks good, then you’d restart NGINX:
service nginx restart