Nginx Pylons subdomains

Setup automatic sub-domains in pylons with nginx is very easy.

First, add A record in your DNS manager: '*' (without quotes) to your IP Address.
Or, if you using bind9 server, at the end of /etc/bind/db.local file add a new line:
* IN A 127.0.0.1
Second, change server name at nginx site configuration file to:
server_name example.com *.example.com;
(example.com replace with your domain name)

Thats all. Now, you can use sub_domain key in the conditions argument.

0 comments:

Post a Comment