404 Error on CSS files when visiting non-www address

February 15, 2015 1.2k views

Hey guys,

Have configured nginx to serve both a static webpage and a Django app through uwsgi.

When I visit myapp.com I get 404 on my CSS and JS files. If I go to www.myapp.com everything is just fine.

How is that and what and how do I fix it?


1 comment
  • Hi! Could you post you Nginx configuration on a pastebin? Without more details, it's hard to help you.

    More generally though, I usually recommend picking either www.domain.com or domain.com and redirecting one to the other.

Be the first one to answer this question.