Web Server Configuration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Server Configuration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old June 22nd, 2004, 02:53 AM
Neophiter Neophiter is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 1 Neophiter User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Another Apache VirtualHost Problem Thread...

Hey all --
Been working on this a loong time, trying to figure it out.

Here's The Setup: *sigh*

1.) Domain name 'mysite.com' is sent to ns0 - ns4.dnsmadeeasy.com.
2.) ns<n>.dnsmadeeasy.com sends to 111.111.111.111
2b.) CNAME records www.mysite.com, neo.mysite.com, ftp.mysite.com, and mail.mysite.com
all point to mysite.com .
3.) 111.111.111.111 (all standard ftp, mail, www, etc ports) goes through the router into internal 192.168.0.2.
4.) Apache, PHP, MySQL on an XP system... (too lazy to learn Linux, I guess.)
4b.) The dreaded httpd.conf file:

NameVirtualHost *

<VirtualHost *>
ServerAdmin admin@mysite.com
DocumentRoot /Apache/htdocs/mysite/htdocs/mail/
ServerName mail.mysite.com
ErrorLog /Apache/logs/mail.mysite-error_log
CustomLog /Apache/logs/mail.mysite-access_log common
</VirtualHost>

<VirtualHost *>
ServerAdmin neo@mysite.com
DocumentRoot /Apache/htdocs/neo/htdocs
ServerName neo.mysite.com
ErrorLog /Apache/logs/neo-mysite-error-log
CustomLog /Apache/logs/neo-mysite-access-log common
</VirtualHost>

<VirtualHost *>
ServerAdmin admin@mysite.com
DocumentRoot /Apache/htdocs/mysite/htdocs
ServerName www.mysite.com
ServerAlias mysite.com
ErrorLog /Apache/logs/mysite-error-log
CustomLog /Apache/logs/mysite-access-log common
</VirtualHost>

# (This is after MUCH working and playing with things -- I have tried substituing the * with everything from
# 127.0.0.2 to 192.168.0.2 to 111.111.111.111 to *:80 and beyond to trying to get the subdomains to work...

The Problem:

When I go to 'mysite.com', it goes to the main directory...not the DocumentRoot I specified under the VirtualHost. UNLESS I substitute <*:80> for the <*>, then it will go to mail.mysite.com no matter what, and I can rearrange the subdomains to my hearts content, and it will always go to the first one listed, despite what I type in.

Please show my where I'm stupid, so I can move on to proving it in another area....

Thanks for your time!

Reply With Quote
  #2  
Old June 22nd, 2004, 07:46 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Check out the docs at http://httpd.apache.org/docs/vhosts/name-based.html, particularly the bottom section.
__________________
Please don't PM me asking for solutions outside the scope of a thread.
Keeping all responses in a thread stands to help others who come along later,
which is after all what this forum's all about.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Server Configuration > Another Apache VirtualHost Problem Thread...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway