Salta al contenuto principale

CentOS 7 - General Support • nginx www to none www

I have been trying to redirect one of the websites from www to none www. I have tried adding a redirect.conf /etc/nginx/conf.d/redirect.conf

server {
return 301 $scheme://$request_uri;

I believe, I may need to change the listen directive to port 443, but I'm not sure how or where I need to add this and also add ssl info to the server block.
Or is there an easier way??

Nginx & Varnish & Apache
thanks in advance

Statistics: Posted by Pastose — 2023/08/21 08:04:44