How to allow both http and https?
I added following nginx conf
listen 443 ssl http2;
listen [::]:443 ssl http2;
But when i check by -
nginx -c /etc/nginx/nginx.conf -t
its show conflict massage.
[warn] conflicting server name "example.com" on 0.0.0.0:80, ignored
Any particular reason why you want to have page served separately from both HTTP and HTTPs. It would create the duplicate content issue for the website. I think it isn't a good practice to not redirect the HTTP to HTTPs.
WO creates a redirect conf in /etc/nginx/conf.d/ called force-ssl-yoursite.com.conf - you'll need to comment that out to avoid the conflict (and redirect). You also need to be aware of the other includes WO does in your site conf.
Hosted by VirtuBox