Meteor/Nginx on Ubuntu 16.04 forcing non-www to https

Hiyas, I’m following this tutorial - - to point my godaddy domain - to a meteor app deployed to a DO droplet. I’m also using mupx to deploy the meteor app -

Whatever I do, whenever I type in, it takes me to Now I did add 2 A records to my DO domain, @ to ip, and www to ip.

Here’s my nginx vhost -

server {
  listen        80;
  access_log    /var/log/nginx/;
  error_log     /var/log/nginx/;

  location / {
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header X-Forwarded-For $remote_addr;

And I added to this nginx default -

# redirect www to non-www
server {
    listen 80;
    # to redirect all subdomains use * instead of
    server_name *;
    return 301$request_uri;

When I run curl -I - I get -

 curl -I
HTTP/1.1 302 Moved Temporarily
Server: nginx
Date: Sun, 22 May 2016 06:50:28 GMT
Connection: keep-alive
Access-Control-Allow-Origin: *

Kinda lost and chasing my tail now, anyone see something that makes sense?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @ghostrunners,

It looks like you may have already resolved the problem, but let us know if you haven’t and if you need any further assistance!