I have an angularjs one application in a dist folder. I would like to host it on my nginx. My nginx currently hosts multiple applications via proxy_pass. I've never hosted a static html app on nginx so I'm not sure what to do.
- I have my app in
distfolder on the nginx server at location/home/anthony/dist. - My nginx configuration has only a single file in
ssl_proxyinsites-enabledfolder - Under
sites-availableI have alocationsfolder that contains various.conffiles.
I've created a new file at /etc/nginx/sites-available/locations/mystatic.conf and placed the following content in it:
location /mystatic {
try_files $uri $uri/ /home/anthony/dist/index.html;
}
But after restarting nginx and going to http://<myserver>/mystatic I get a 404.