Base Scafold project for a docker-compose with automated nginx, it has only 2 services api and pwa Folder Structure:
[proxy folder]
├── conf.d // Folder
├── my_proxy.conf // general nginx conf
├── nginx.tmpl // nginx template
└── vhost.d
└── awesome-domain.com // specific nginx config for that domain
awesome-domain.com file example to perform non-www to www redirection:
if ($host ~ ^(?!www\.)(?<awesome-domain>.+)$) {
return 301 $scheme://www.$awesome-domain$request_uri;
}