It really bites having to add an alias every time you need a subdomain on your development machine. Is there a way to configure passenger to use wildcards so that i can access randomsubdomain.mysite.local ?
+3
A:
This is not a passenger problem. It depends on which server you're using:
nginx:
server {
# …
server_name www.yourdomain.com *.yourdomain.com;
# …
}
apache:
<VirtualHost …>
# …
ServerName www.yourdomain.com
ServerAlias *.yourdomain.com
# …
</VirtualHost>
jigfox
2010-08-02 12:03:06
+1
A:
In order to have wildcard subdomains you need to have a DNS server running on your local machine. Below are some articles that got it working for me:
- Setup bind (only step 1 in this article)
- Configure DNS server (Replace 'vmdev' with 'local' in this article)
- add
*.app.local
in passenger pref pane 'Aliases' for each app