LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-28-2004, 03:59 PM   #1
sporkit
Member
 
Registered: Feb 2004
Posts: 71

Rep: Reputation: 15
setup an apachie subdomain


Code:
<VirtualHost 192.168.1.55:80>
DocumentRoot /files/sites/fateRD/
ServerName www.f8klan.com
</VirtualHost>

<VirtualHost 192.168.1.55:80>
DocumentRoot /files/sites/sporkit/
ServerName www.sporkit.com
</VirtualHost>

<VirtualHost 192.168.1.55:80>
DocumentRoot /files/sites/friends/
ServerName www.friends.sporkit.com
</VirtualHost>
ok so heres the setup i have going, im using fedora core 1. first off friends.sporkit.com is only getting dns errors. ive tried several things and it seems that if i replace the the ip address with a * then sporkit.com gets forwarded to f8klan.com. also if i take the www. away from the front of all the servernames then sporkit.com is forwarded to f8klan.com again. pretty much all the little combinations ive tried still send me back to the f8klan.com directory.

the above configuration sends to f8klan.com and sporkit.com correctly but friends.sporkit.com just gets a dns error. im i overlooking something obvious?

thanks.
 
Old 07-28-2004, 04:12 PM   #2
RHELL
Member
 
Registered: Feb 2004
Location: Outermost mingetty
Distribution: RHEL3,RH4U4,Sol9, Sol10
Posts: 321

Rep: Reputation: 31
Does 'host friends.sporkit.com' resolve the hostname? Does reverse DNS work?
Is there a configured DNS zone for the subdomain friends.sporkit.com?
 
Old 07-28-2004, 04:27 PM   #3
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Rep: Reputation: 30
It looks like you use Name based virtual hosting.....

I have posted an explanation bout apache and virtual hosts a (long) while ago.... Maybe you can find it... but the short version is:

Check if you can find an NameVirtualHost in your httpd.conf....

Then set it up like this:

Code:
NameVirtualHost *

<VirtualHost *>
DocumentRoot /files/sites/fateRD/
ServerName www.f8klan.com
</VirtualHost>

<VirtualHost *>
DocumentRoot /files/sites/sporkit/
ServerName www.sporkit.com
</VirtualHost>

<VirtualHost *>
DocumentRoot /files/sites/friends/
ServerName www.friends.sporkit.com
</VirtualHost>
Remember that if you point another name to this server, e.g. silly.sporkit.com and there is no virtualhost with that servername, it will default to the first virtualhost. In this example, it will show www.f8klan.com

Last edited by Satriani; 07-28-2004 at 04:45 PM.
 
Old 07-28-2004, 07:25 PM   #4
sporkit
Member
 
Registered: Feb 2004
Posts: 71

Original Poster
Rep: Reputation: 15
thanks Satriani. i actually have tried using the "*" before. however for some reason when i use this that virtual host will forward me to the default one (f8klan.com) im just wondering if it because i theres something wrong on my site.

maybe this is how it is on older versions of apache. my newer version must have www. and the actuall IP address infront. unless i actually did something wrong. :/

oh and silly me i went ahead and setup the dns record. i thought my machine would be the one to sort them out. guess not.
 
Old 07-29-2004, 04:45 AM   #5
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Rep: Reputation: 30
I thought that NameVirtualHost is available from version 1 (But i could be wrong of courz)

And the www in front of it is really nonsense... its just a name...

Lets create a test scenario then:

In you httpd.conf find the line NameVirtualHost *

Make sure its ot commented out, and its above the virtualhosts.....

Code:
NameVirtualHost *

<VirtualHost *>
  DocumentRoot /files/sites/fateRD/
  ServerName www.f8klan.com
</VirtualHost>

<VirtualHost *>
  DocumentRoot /files/sites/sporkit/
  ServerName www.myvirtualhost.org
</VirtualHost>
As you can see, i have changed the second virtual host... please do that also, since i dont know your dns setup.... This is just a test scenario huh!

Now, on the client computer (What OS is that???)

ping www.myvirtualhost.org

It should say something bout not a known host... (That is correct!)

Next, edit your hosts file, and add www.myvirtualhost.org with the correct ip address...

Ping www.virtualhost.org

Now you SHOULD!!! get a reply... If not, you now for sure your nameresolving is messed up.

If you did get a reply, point your browser to www.myvirtualhost.org and the website you created in /files/sites/sporkit should show up.

Let me know if it worked?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS & Subdomain Setup Murpe Linux - Networking 0 03-10-2004 11:00 AM
Subdomain help DoobyWho Linux - General 3 04-14-2003 06:51 PM
how to setup subdomain for users in apache? earl Linux - Security 5 12-05-2002 07:49 AM
Subdomain and apache! eXor Linux - Networking 1 10-13-2002 05:49 PM
subdomain deepak Linux - Networking 2 03-01-2001 09:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration