Redirect to WWW (mupx & force-ssl)


#1

Hi,

I currently use mupx and force-ssl.

Currently my websites with “www” work such as www.peercapita.com or https://www.peercapita.com

However, when someone types peercapita.com or when I test it on pingdom, the page does not load. May I know how do I solve this? I have already made the necessary CNAME records.


#2

What’s your hosting? I use Nginx and redirect all www domains to the apex domain in the configs.


#3

Hi,

Thanks for replying, I’ve been struggling with this for some time.

I use Digital Ocean. May I know how you do it?

It seems mupx uses docker and any changes to the nginx files do not work.

I tried doing this for my sites-available config but it didn’t work:

server {
listen 80;
server_name peercapita.com;

return 301 http://www.peercapita.com$request_uri;

}


#4

This is what I’m using on one of my sites (Nginx), but this example is not a meteor site.

I’m using mupx/docker for a Meteor deployment but it doesn’t look trivial to change the Nginx configs according to this issue — https://github.com/arunoda/meteor-up/issues/738. I’m not familiar with Docker at all. In fact I’ll be switching to Galaxy as soon as I can so I don’t have to deal with any of this devops fun.