You can just edit the config:
You edit the non-ssl file: sitename.nginx.conf file, like so:
(where xxx is your ip and replace [domainname] with your real domain name):
listen xx.xxx.xxx.xxx:80;
server_name [domainname];
#to force use of httpS:
return 301 https://$server_name$request_uri;
Remember to restart nginx. Works for me.
—-
You edit the non-ssl file: sitename.nginx.conf file, like so:
(where xxx is your ip and replace [domainname] with your real domain name):
listen xx.xxx.xxx.xxx:80;
server_name [domainname];
#to force use of httpS:
return 301 https://$server_name$request_uri;
Remember to restart nginx. Works for me.
—-
Statistics: Posted by gn7 — Fri Nov 29, 2024 4:17 am