Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

virtual host

Posted on 2001-08-30
5
Medium Priority
?
328 Views
Last Modified: 2013-11-18
my web server is apache 1.3.19 running on RH 7.1

I have setup two name based virtual host and disable the global directive e.g. documentroot, servername

abc.com is the original default domain before adding two new virtual host

xyz.com and mydomain.com is new virtual host

but I found that when I access http://abc.com it will display the web content of the first virtual host ie xyz.com

my httpd.conf is something like that

Include /etc/httpd/conf/xyz.com.conf
Include /etc/httpd/conf/mydomain.com.conf





0
Comment
Question by:adrianmak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Accepted Solution

by:
larry718 earned 80 total points
ID: 6452052
Try this, I've got this to work on my machine:

I am a newbie at this and here's what I did to get virtualhost of 2 domain names working:

From a new apache 1.3.20 httpd.conf setting:

#NameVirtualHost *

# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
========================================
so you change this to:

NameVirtualHost *

<VirtualHost *>
    ServerAdmin webmaster@abc.com
    DocumentRoot /usr/local/apache/htdocs/www/abc
    ServerName www.abc.com
    ErrorLog /usr/local/apache/logs/abc.com-error_log
    CustomLog /usr/local/apache/logs/abc.com-access_log common
</VirtualHost>

<VirtualHost *>
    ServerAdmin webmaster@mydomain.com
    DocumentRoot /www/docs/mydomain.com
    ServerName www.mydomain.com
    ErrorLog /usr/local/apache/logs/mydomain.com-error_log
    CustomLog /usr/local/apache/logs/mydomain.com-access_log common
</VirtualHost>
=============================================
make sure you create directories within the htdocs/www & htdocs/logs for these 2 domain names.  
also
> ./apachectl configtest
before you
> ./apachectl start

Good Luck! =)
0
 
LVL 1

Expert Comment

by:larry718
ID: 6452059
oops, i've double check, i actually got apache 1.3.19.
0
 
LVL 16

Expert Comment

by:The--Captain
ID: 6474078
Very easy.  Once again, I will not reveal it to you.

Clean up your question history (over 70 open questions), kick up the points, and maybe folks will start answering your questions.  

I know this is not the first time I have bugged you about this problem, which only seems to have gotten worse.

Please clean up your act.

-Jon
0
 
LVL 3

Expert Comment

by:modder
ID: 6511918
adrianmak's account has been closed for refusing to provide feedback even after being reminded.

Please advise as to who should get points for this.

modder
Community Support
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6836865
This question appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, you must tell the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below, include the question QID/link.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this Help Desk link for Member Guidelines, Member Agreement and the Question/Answer process:  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues.
http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.11983658.html
http://www.experts-exchange.com/questions/Q.20036627.html
http://www.experts-exchange.com/questions/Q.20086927.html
http://www.experts-exchange.com/questions/Q.20038026.html
http://www.experts-exchange.com/questions/Q.20115179.html
http://www.experts-exchange.com/questions/Q.20137648.html
http://www.experts-exchange.com/questions/Q.20142044.html
http://www.experts-exchange.com/questions/Q.20146117.html
http://www.experts-exchange.com/questions/Q.20145507.html
http://www.experts-exchange.com/questions/Q.20151134.html
http://www.experts-exchange.com/questions/Q.20151223.html
http://www.experts-exchange.com/questions/Q.20176702.html
http://www.experts-exchange.com/questions/Q.20180730.html


PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:
 
Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange


P.S.  For year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question