Subpath with Nginx and Gatsby

Use Case

How Nginx works?

Gatsby Path Prefix

Final Nginx configuration

location / {
root /var/www/growpad.io/html;
index index.html;
}
location /blogs/ {
alias /var/www/blogs/html/;
index index.html;
}
  1. Which location is served based on the route
  2. What is alias and root and the different between them

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store