this is one of the reasons of starting this server :) TIL how to redirect www. to the main secured endpoint

3 years ago by majorswitcher to c/chat

This tutorial will show you how to redirect a www URL to non-www, e.g. www.example.com to example.com, with Nginx on CentOS 7.

thanks to @Hopfgeist@feddit.de for noticing www.lemmyfly.org was not secured and not pointing to the lemmy instance.

Checking the lemmy ansible files I saw your nginx configuration file is located in /etc/nginx/sites-available/[sitename].conf

To add a redirect for your www.[sitename, add: (lemmyfly.org example)

server {
  server_name www.lemmyfly.org;
  return 301 $scheme://lemmyfly.org$request_uri;
}

check your config with sudo nginx -t

restart nginx: sudo systemctl restart nginx

chat

@lemmyfly.org

login for more options
1
7
1

a place for general chat and ask questions about lemmyfly

go to feed...