|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
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! |
|
#2
|
||||
|
||||
|
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. |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Server Configuration > Another Apache VirtualHost Problem Thread... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|