Node.js(Express) and Nginx [solved]

Node.js(Express) and Nginx [solved]


Hello guys,

I installed a SSL certificate on my server yesterday. My server is working just fine, but it only serves the static files over HTTP instead of HTTPS and I don’t know why. The static files are accessible both on HTTP and HTTPS. I want the server to only serve them on HTTPS so that I’m not getting

Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure stylesheet ''. This request has been blocked; the content must be served over HTTPS.

I’m not sure whether this is fault of the settings of Nginx or Express.

note: I haven’t set up Express for HTTPS (I’m not sure whether this is necessary. IMO, it is NOT)


You’ve marked this as solved, which is great, but would you mind putting a few sentences down about what the problem was and how you fixed it? That could come in handy for anyone searching for the same solution.


Sure thing. The entire problem was caused by a silly mistake with base tag where I had set http and therefore all my links were redirected to http.