Thank you so so much, you save my life!!!!!!🎉🎉 after spending 2 days of searching solution to host an angular app on Ubuntu, finally I found your video to setup the nginx🎉
Nice video, i have a error when load the app angular, the error is " Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec".
You will have to deploy them in different folders such as app1 and app2. Then, configure the routes using 2 different location tags, such as location /app1{ } and location /app2 { } And their index files will be accessible as per the mappings. This is practical since a single server can host multiple applications.
@@codippa thanks, it work with the next configuration for each project: location /projectN/ { autoindex on; try_files $uri$args $uri$args/ /projectN/index.html; }
It is a working example, please check the URLs that you have defined and the ones being accessed. 404 means that the URL accessed is not available. Would be a mismatch somewhere.
after watching this, I understand nginx too. Thanks you
Glad to hear that
Great!! Finally I found a good tutorial that helped me
Thank You !
Thank you so so much, you save my life!!!!!!🎉🎉 after spending 2 days of searching solution to host an angular app on Ubuntu, finally I found your video to setup the nginx🎉
Great to know!
Great content! I have app with base href of /report/ and when I deploy it to nginx I get issues related to MIME type of "text/html"
Very good. I was looking for it but I didn't find. Thank you so much
Thanks..
Hope it worked out for you !
Great Content !, Please do more videos on, how can we set headers and CORS while sending request to backend. Thanks in advance :)
Thank you...
Will try to make the suggested videos.
Nice video, i have a error when load the app angular, the error is " Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec".
Thank You...
Try adding this line
include mime.types;
inside http block
The images aren't load in ../demoapp/, why?
Where are your images located. Probably they are in some folder for which there is no mapping in nginx.conf such as,
location /images/ {}
Hi, what if have 2 angular projects in the same ngix server, do you know how to configure the .conf file? I have been triying without sucess
You will have to deploy them in different folders such as app1 and app2.
Then, configure the routes using 2 different location tags, such as
location /app1{
}
and
location /app2 {
}
And their index files will be accessible as per the mappings.
This is practical since a single server can host multiple applications.
@@codippa thanks, it work with the next configuration for each project:
location /projectN/ {
autoindex on;
try_files $uri$args $uri$args/ /projectN/index.html;
}
Thank you !
not working!! i get a 404
It is a working example, please check the URLs that you have defined and the ones being accessed.
404 means that the URL accessed is not available. Would be a mismatch somewhere.
thank you