Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up wildcard domains on local host (OS X 10.5)?

Tags:

People also ask

How do I create a domain wildcard?

A wildcard DNS record is specified by using a "*" as the part of a domain name, e.g., *. example.com. NOTE: A wildcard DNS record does not cover a root domain (e.g. yourdomain. tld), thus you will need to create a record for @ host additionally.

Can you add wildcard to hosts file?

1 Answer. Usually /etc/hosts file doesn't support any wild card entries.

How do I enable wildcard subdomains?

To enable the wildcard subdomain, go to your Site Tools > Domain > Subdomains. The wildcard subdomain is the one with an * in front of the domain. You can enable it from the Manage Subdomains > Actions menu.

How do you use wildcard in etc hosts?

Create a configuration to map the wildcard subdomains to the same IP. Restart the service. Create /etc/resolver directory. Create a custom DNS resolver where the file name is the domain name.


I am starting to develop a site which basically acts as WordPress MU, in the sense that a user can signup and have their own blog. I will be coding this in Rails, however I am hoping to be able to utilize wildcard subdomains, so I can use the format such as blog.example.com. I've done some searching but I can't find any good resources.

Since I am using Rails, I'm not sure where to put this, as I am using Mongrel, and not Apache. I can bypass doing this on my local machine by developing remotely on my server, however I would only like to keep this as a last resort.

I can give more details about my development environment if needed, but here are the basics:

  • Mac OS X Leopard 10.5.6
  • Ruby 1.8.7
  • Rails 2.3.2