Search Posts

Category: nginx

502 error on file upload (angular) to node app on nginx

I’ve been banging my head over this issue for a couple of days now. The issue is whenever a file (.pdf) is uploaded from the frontend (angular), I immediately see an error in the console: Now I can definitely eliminate the chance of this being a CORS issue as all the other APIs (GET/POST/PUT) are working just fine, only this upload api fails. I’m able to see this error in nginx logs: 2018/06/08 03:08:13 [error] […]

Dockerize AngularJS app, from angular-seed skeleton

I have built my Web application in AngularJS framework with the angular-seed skeleton I want to have a build folder like /dist so I can use Nginx to deploy it in a Docker Container. I have to run my app with SSL and with .pem certificates. I have tried different solutions (There are many solutions for Angular2 apps) for many days and there is no specific solution to Dockerize Angular-seed App. I would love […]

nginx OpenREsty handle requests

I have a nginx server that acts like a proxy between , client and server . I am using Lua nginx Module ( open resty), front end technology ( Angular) . and web service is implemented in the server side For some particular reasons , In the proxy i am managing to make some particulars calls and treatments .using Lua , I will make some code access_by_lua_block {}between the brackers . So I wast just […]

Grunt correspoding Nginx configuration for Angular application

how to Grunt correspoding Nginx configuration for Angular application I have a configuration for Grunt server below livereload: { options: { open: true, middleware: function (connect) { return [ modRewrite([‘^[^.]*$ /index.html [L]’]), connect.static(‘.tmp’), connect().use( ‘/bower_components’, connect.static(‘./bower_components’) ), connect().use( ‘/app/styles’, connect.static(‘./app/styles’) ), connect.static( ]; } } }, It works perfectly with Grunt development-environment, but now I would like to have the same modRewrite configuration for Nginx also, as I put the app into production. What is […]

reloading the deep route after removing the ‘#’ from url in express angular app throwing error

I tried to remove the hashtag from url in angular app. Issue: The redirection works perfectly if I first load the index page and then goto any route, however, it throws an error when I reload any deep route page directly. If I refresh any page : localhost:3001/about, It throws error however when I route from index page <a href=”/about”>About </a> it works. I checked many answers for modrewrite, however, none worked for me. In […]

How to pre-render my dynamic web page which is using angularjs(v1) and nginx

I have a dynamic page for the specific image and video like and 2562 is the id of content which is dynamic. I want to share this URL in social share in FB and Twitter. The problem is when I do copy and paste this URL into FB or twitter the meta tag of the index.html is not updated(cause this website is single page application). I have seen the solution from site. But […]

First page load is really slow – Angular 1.3 + Meteor

My application is based on angular 1.3 + Meteor And my page loads are slow, especially the first-page load. How can I optimize these page loads? Is there any tool or something to debug what is taking so much time? I have been reading articles, some of them were saying that images should not be placed in myapp/public folder, I don’t understand what is the purpose of myapp/public folder then? I would really appreciate […]

Send huge json data to nodejs server using $http

I wanted to send a huge data(approx 5MB) from my Angularjs application to nodejs server, my node server is hosted in kube’s cluster due to some reason we are unable to update the nginx configuration, So is there any possibility I can send my json daa in chunk’s or convert the JSON data object to a file and send as multipart http request ? is this a good idea? Source: AngularJS

AngularJS i18n is not working in NGINX

I actually work in a project using AngularJS project with i18n for multiple languages but recently I’ve try to mount the project in a server using Nginx with dist/ folder but when I check the page I saw that i18n did not work correctly. The strange thing is that it works correctly when I open index.html in browser The server show: When I need: I using the next configuration in nginx: upstream frontend { server […]

Next Page »