Skip to content

Instantly share code, notes, and snippets.

@jissereitsma
Last active September 25, 2020 13:26
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jissereitsma/c67b8b035ddbc15cde07791dee8a2c8e to your computer and use it in GitHub Desktop.
Partial Nginx configuration for Magento 2 with React app in `/public/pwa` folder
#location = / {
# try_files $uri /index.php;
#}
#location / {
# try_files $uri $uri/ /index.php?$args;
#}
location = / {
try_files /pwa/index.html =404;
}
location ~ ^/(media) {
try_files $uri $uri/ =404;
}
location ~ ^/(graphql|api|admin_1jphuz) {
try_files $uri $uri/ /index.php?$args;
}
location / {
try_files $uri $uri/ /pwa/$uri /pwa/$uri/ /pwa/index.html =404;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment