Thursday 30 May 2019

NGINX - Tackling Tricky deployment config aspects


Developing Angular application has become quite easy these days, since lot of online reading materials, help and guide are readily available.



There is some pain point still not standardised, when it comes to deployment of angular (NGINX) application in clouds.


The file that become matter of importance is default.conf


If you application context path is : myapplication

#This configuration will load your application of F5 or refresh once url is already loaded.

       location / {
           root /usr/share/nginx/html/myapplication/;
           try_files $uri $uri/ /myapplication/index.html;

       }



     location /myapplication/ {

           index index.html index.htm;
           try_files $uri $uri/ /myapplication/index.html;

      }






   #Healthz check

        location /myapplication/healthz {
            return 200 “UP”;
        }




Thank you!


Satender Kumar Mall
Twitter: @satenderiiit

No comments:

Post a Comment