Con la siguiente configuración de Nginx:
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;
}
Estoy tratando de redirigir http://178.62.136.230/
a http://isitmaintained.com/ pero cuando implemento esta configuración termino con uno Redirect loop
o ambos enlaces.
¿Qué estoy haciendo mal?
nginx: [emerg] could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32
aparece el siguiente error: :( Y eso no tiene sentido porque mi nombre de dominio no es tan largo.Estabas cerca Es reescribir lo que estás buscando.
fuente
rewrite
yreturn
arriba hacen exactamente lo mismo.