Quantcast
Channel: EasyEngine Community Forum - Latest posts
Viewing all articles
Browse latest Browse all 12639

Redirect non-www to www on ssl

$
0
0

Yes, put your code in `/var/www/domain.com/conf/nginx/ssl.conf. Here is mine.

listen 443 ssl http2;

server_name domain.com;

ssl on;
ssl_certificate     /etc/letsencrypt/live/domain.com/fullchain.pem;
ssl_certificate_key     /etc/letsencrypt/live/domain.com/privkey.pem;

In this file, /etc/nginx/conf.d/force-ssl-.conf I already have the redirect set up for port 80, but I cannot seem to redirect port 443?

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

Viewing all articles
Browse latest Browse all 12639

Trending Articles