Welcome! Log In Create A New Profile

Advanced

redirect all unconfigured subdomains

Posted by vonHerman 
redirect all unconfigured subdomains
May 14, 2013 06:10PM
Hi all,
I'm happy to join NGINX community and want to share with you with my little problem.

I've got wildcard entry for example.com in my DNS which points all subdomains to some machine
* IN A 172.172.172.172
While NGINX configuration for this domain contains only actively used subdomain names
server {
listen 10.0.0.1:80;
server_name example.com www.example.com
moskva.example.com www.moskva.example.com
tokyo.example.com www.tokyo.example.com
...
}
What I want to achieve is directing all unconfigured subdomains like 'mistake.example.com' to specific address.
Is there any elegant way of solving this problem?

Best Regards
Arek
Re: redirect all unconfigured subdomains
May 15, 2013 12:05PM
Separate server block with no server_name directive? Or a dedicated IP for those unconfigured?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 194
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready