virtual host

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





adrianmakAsked:
Who is Participating?
 
larry718Connect With a Mentor Commented:
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
 
larry718Commented:
oops, i've double check, i actually got apache 1.3.19.
0
 
The--CaptainCommented:
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
 
modderCommented:
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
 
MoondancerCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.