Click to See Complete Forum and Search --> : something.mydomain.com
JoeyJoeJo
04-03-2003, 04:46 PM
I have a question about, for example, sourceforge. Sourceforge offers homepages i.e. gaim.sourceforge.net. My question is, how do you go about doing this? I have trinitygroup.us registered and running correctly. I want to add brian.trinitygroup.us, which I have done with my dns people. So, how do I make apache recognize that as a different page? My Current syntax is
<VirtualHost "brian.trinitygroup.us" *>
DocumentRoot /var/www/brian
ServerAdmin brian@trinitygt.com
ServerName trinity
DirectoryIndex index.html default.htm
LogLevel debug
HostNameLookups off
</VirtualHost>
Apache says that its okay, but both www.trinitygroup.us and brian.trinitygroup.us have the same results.
Thanks for the help
dungscooperdave
04-03-2003, 04:55 PM
I'm not exactly an expert on web hosting, but... wouldn't you just give apache a different index page to be used for each domain name?
JoeyJoeJo
04-03-2003, 04:56 PM
I tried that, but I must have done something wrong....
Try using your ip as VirtualHost.
Sharks Fan
04-03-2003, 10:22 PM
I'm no DNS expert but here's my take. When you buy the rights to www.mydomain.com, some DNS server tells the Internet that this site is at xxx.xxx.xxx.xxx. (In my case, I have my DNS entry maintained with PacBell/SBC.)
I understand that the key concept of DNS is that now, anything below that site, i.e. something.mydomain.com, is controlled by my site. There needs to be a valid DNS entry that tells a user where he is going to find that site. I could use xxx.xxx.xxx.xxx:8080 or xxx.xxx.xxx.yyy (another machine) as the location of something.mydomain.com within DNS.
THEN, I can tell Apache if any requests come in to these locations, here's where you direct them. But if there's no DNS entry, the Internet doesn't know how to direct these requests to me and Apache will never see them.
I must admit I don't understand exactly where or how the sub-domain requests are stored. (INstalling DNS is on my to do list.) The PacBell DNS server tells you that www.mydomain.com is my IP address. Will PacBell pass on any request to something.mydomain.com to my IP looking for a DNS server there that contains the sub-domain information? Any help would be appreciated.
nemesiox
04-03-2003, 10:42 PM
Hey I know what you're talking about. I had the same issue but I friend from work advised me how to do it. You also need to create a section for www.trinitygroup.us
Ex: My domain is nemesio.net
<VirtualHost 192.168.1.5>
ServerAdmin sarah@nemesio.net
DocumentRoot /srv/www/htdocs
ServerName www.nemesio.net
</VirtualHost>
<VirtualHost 192.168.1.5>
ServerAdmin suse@nemesio.net
DocumentRoot /home/suse/public_html
ServerName suse.nemesio.net
</VirtualHost>
So.. he will need to change VirtualHost to his ip and what he was using as VirtualHost to ServerName. That should work.
b_usa
04-04-2003, 01:55 AM
you dont need to use an IP unless you have a separate IP for each site. But you do need to have a virtual server entry for every site you host. The first virtual host entry will be the default. After that anything goes....:)