tags:

views:

18

answers:

1

Hello, I just planned to create a blogging application in Java. But i am not understanding one thing. say suppose my site is xyz.com and user T registers on site then he can browse it through T.xyz.com. How can this be possible? I googled few sites and found that people on those sites advise to keep wildcard *, so we can catch any subdomain *.domain.com. This is fine but i am working on localhost, and haven't hosted the site. So which domain should i type? and where to type? I am using Ubuntu 9.10 and Bind

Any help would be appreciated.

Thanks in advance!

A: 

Localhost can also have subdomains, but you need to fix your local dns to allow it.

Here's what I found (I'm not a linuxer so I can't test it), http://www.qc4blog.com/?p=576. You also need to do the apache thing equivalent to your server...

Under linux, it is: /etc/hosts

Open the file, and append a new line with the following: "127.0.0.1 site1.localhost"

Next step is to edit apache httpd.conf file and declare your subdomain. Locate your httpd.conf file and append the following:

<VirtualHost *>
  ServerName site1.localhost
  DocumentRoot "path/to/website"
</VirtualHost>
Tor Valamo
But i am using Glassfish! where i can find this httpd.conf file? I am unable to find this file on my harddrive?Please helpwaiting for your comments
Ankit Rathod
http://blogs.sun.com/jluehe/entry/new_support_for_virtual_directory
Tor Valamo