nginx www to none www

General support questions
Post Reply
Pastose
Posts: 1
Joined: 2023/08/21 08:02:58

nginx www to none www

Post by Pastose » 2023/08/21 08:04:44

Hi,
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 {
server_name https://freegayporn.club/sites/jizz-addiction/;
server_name https://gayporn.name/channels/euro-boy-xxx/;
server_name https://freegayporn.club/sites/latin-leche/;
return 301 $scheme://example.com$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

Post Reply