The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> System Administration
> Apache Development
|
general - Apache only recognize one domain..
Discuss Apache only recognize one domain.. in the Apache Development forum on Dev Shed. Apache only recognize one domain.. Apache Development forum discussing HTTP Server general topics, configuration, and modules. Apache is an open source web server that runs on multiple platforms.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

April 13th, 2012, 11:12 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 4
Time spent in forums: 50 m 49 sec
Reputation Power: 0
|
|
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..!!
|

April 14th, 2012, 10:51 AM
|
 |
CSS & JS/DOM Adept
|
|
Join Date: Jul 2004
Location: USA
|
|
|

April 14th, 2012, 03:14 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 4
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..
|

April 14th, 2012, 03:23 PM
|
 |
CSS & JS/DOM Adept
|
|
Join Date: Jul 2004
Location: USA
|
|
|
Did you restart Apache after you made the change?
|

April 14th, 2012, 03:50 PM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 4
Time spent in forums: 50 m 49 sec
Reputation Power: 0
|
|
|
Yes, everytime I make a Change, I restart apache..
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|