With the following Nginx config:
server {
listen 80;
listen [::]:80 default_server ipv6only=on;
server_name isitmaintained.com;
...
}
server {
listen 178.62.136.230:80;
server_name 178.62.136.230;
add_header X-Frame-Options "SAMEORIGIN";
return 301 $scheme://isitmaintained.com$request_uri;
}
I am trying to redirect http://178.62.136.230/
to http://isitmaintained.com/ but when I deploy this config I end up with a Redirect loop
or both of those links.
What am I doing wrong?