redirect traffic (nginx)

  • Hi:


    I create a site with nginx plugin.
    add a digital certificate.
    Everything works fine from internet using eg. https://mysite.com.
    But not when only use mysite.com.
    How to automatically redirect mysite.com to https://mysite.com


    Thanks


    after a while reading the solution is to edit /etc/nginx/nginx.conf :


    server {
    listen 80;
    server_name example.com;
    return 301 https://$server_name$request_uri;
    }

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!