Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@tompec
Created June 22, 2017 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tompec/bc546b2222b233e571bec987904a797b to your computer and use it in GitHub Desktop.
Save tompec/bc546b2222b233e571bec987904a797b to your computer and use it in GitHub Desktop.
Redirect IP to domain name in NGINX
server {
server_name 123.456.789.123;
return 301 $scheme://www.domain.com$request_uri;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment