Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 13th, 2012, 11:12 PM
javier_ns javier_ns is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 4 javier_ns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 50 m 49 sec
Reputation Power: 0
Unhappy general - Apache only recognize one domain..

Hi.!! I had created some webpages for a couple of friends, and I decided to get a dedicated (A fortatrust promotion $10) so I can manage them myself..
The server came with CentOS 6, apache and Mysql preinstalled, so I just had to install webmin, the ftp users, and the virtualhost as follow:

NameVirtualHost 190.130.XXX.XXX
<VirtualHost *>
DocumentRoot "/home/webpage1/web"
ServerName www.webpage1 .com
ServerAlias *.webpage1 .com
<Directory "/home/webpage1/web">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

<VirtualHost *>
DocumentRoot "/home/webpage2/htdocs"
ServerName www.webpage2 .com
ServerAlias *.webpage2 .com
<Directory "/home/ webpage2/htdocs">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

<VirtualHost *>
DocumentRoot "/home/webpage3/web"
ServerName www.webpage3 .com
ServerAlias *.webpage3 .com
<Directory "/home/webpage3/web">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

(The spaces in the web adresses are due to the forum policy, they dont exist in the real file)

After that, I restart the apache.. then, in Godaddy, I forwarded the domains to my server IP, but It doesnt matter wich of the 3 web addresses I type, it always take me to the webpage1, so I got a couple of questions:
Do I need to set up something more, for apache to handle the virtualhosts..?
Ist better to forward the domains or to redirect to a NS address..?
In order to create a NS address in my server, I need to install BIND or it can be done in other way?
Thanks in advance for all your help..!!

Reply With Quote
  #2  
Old April 14th, 2012, 10:51 AM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,830 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 1 Day 16 h 41 m 9 sec
Reputation Power: 4192
Welcome to DevShed Forums, javier_ns.

The IP address or "*" in the <VirtualHost> start tags needs to exactly match the value of the NameVirtualHost directive. Reference: http://httpd.apache.org/docs/2.0/vhosts/name-based.html
__________________
Spreading knowledge, one newbie at a time. I'm available for hire at Dynamic Site Solutions.

Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

Remember people spend most of their time on other people's sites (so don't violate web design conventions).

Reply With Quote
  #3  
Old April 14th, 2012, 03:14 PM
javier_ns javier_ns is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 4 javier_ns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 50 m 49 sec
Reputation Power: 0
Hi Kravvitz, thanks a lot for your answer, but I had already tried that:

NameVirtualHost 190.130.XXX.XXX
<VirtualHost 190.130.XXX.XXX>
DocumentRoot "/home/webpage1/web"
ServerName www.webpage1 .com
ServerAlias *.webpage1 .com
<Directory "/home/webpage1/web">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

And I still having the same issue, any webpage I type, take me to the webpage1..

Maybe there is something else I need to setup..?
Thanks again for your answer..

Reply With Quote
  #4  
Old April 14th, 2012, 03:23 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,830 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 1 Day 16 h 41 m 9 sec
Reputation Power: 4192
Did you restart Apache after you made the change?

Reply With Quote
  #5  
Old April 14th, 2012, 03:50 PM
javier_ns javier_ns is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 4 javier_ns User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 50 m 49 sec
Reputation Power: 0
Yes, everytime I make a Change, I restart apache..

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > general - Apache only recognize one domain..

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap