Gregory Matthews
New Pleskian
Server Setup:
I've tried the following within /etc/nginx/nginx.conf, and several variations thereof, without success:
server {
server_name xx.xx.xx.xx;
return 301 https://domain.com$request_uri
}
I've also tried the following within the Plesk GUI without success:
if ($http_host ~ "^xx\.xxx\.xxx\.xx"){
set $rule_0 1$rule_0;
}
if ($rule_0 = "1"){
rewrite /(.*)$ https://domain.com/$1 permanent;
}
Where do I need to place this or similar directing in this scenario to direct all direct IP traffic to the domain name? I've tried placing the snippet in various NGINX config files so far without success.
Thanks.
- VPS
- Plesk 12.5
- Centos 7
- NGINX as reverse proxy to Apache 2.4
- Path to NGINX config: /etc/nginx/nginx.conf
I've tried the following within /etc/nginx/nginx.conf, and several variations thereof, without success:
server {
server_name xx.xx.xx.xx;
return 301 https://domain.com$request_uri
}
I've also tried the following within the Plesk GUI without success:
if ($http_host ~ "^xx\.xxx\.xxx\.xx"){
set $rule_0 1$rule_0;
}
if ($rule_0 = "1"){
rewrite /(.*)$ https://domain.com/$1 permanent;
}
Where do I need to place this or similar directing in this scenario to direct all direct IP traffic to the domain name? I've tried placing the snippet in various NGINX config files so far without success.
Thanks.