[PLESK VERSION SHOULD READ 12.0.18]
I would like to add a return statement to nginx_ip_default.conf, as shown, to redirect http traffic to https:
What is the proper method for incorporating this "redirect"?
The top few lines of the nginx_ip_default.conf file are a bit intimidating (when opened to edit):
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
I am running an apache / nginx environment. Do I need to incorporate a redirect within apache, as well?
Thanks, Spasibo, Danke for any guidance!
P.S. I think the http://ubuntuforums.org/ design is the best in the business....
I would like to add a return statement to nginx_ip_default.conf, as shown, to redirect http traffic to https:
Code:
server {
listen 12.34.56.78:80 default_server;
server_name domain.com;
server_name www.domain.com;
server_name ipv4.domain.com;
return 301 https://$host$request_uri;
[...]
}
The top few lines of the nginx_ip_default.conf file are a bit intimidating (when opened to edit):
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
I am running an apache / nginx environment. Do I need to incorporate a redirect within apache, as well?
Thanks, Spasibo, Danke for any guidance!
P.S. I think the http://ubuntuforums.org/ design is the best in the business....
Last edited: