Welcome! Log In Create A New Profile

Advanced

Subdomain and ssl how to have two different settings.

Posted by samuel_m 
Subdomain and ssl how to have two different settings.
March 08, 2017 03:34AM
Got the main domain setup to enforce ssl with the following conf file

server {
listen 80;
listen [::]:80 default_server;
proxy_cache_valid 301 1m;
server_name kenyabuzz.com www.kenyabuzz.com;
return 301 https://$host$request_uri;
}

which then if http is redirected to https and the main ssl conf received the request. However the subdomain awards.kenyabuzz.com is affected.

so the subdomain ends up with enforced ssl.

what would be the best way without affecting the main domain prevent the subdomain from being caught by this.



Edited 1 time(s). Last edit at 03/08/2017 03:38AM by samuel_m.
Re: Subdomain and ssl how to have two different settings.
March 21, 2017 06:42AM
don't use $host in redirect statement.
just explicitly redirect to https://kenyabuzz.com$request_uri;
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 113
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready