Solved

apache config file

Posted on 2002-03-16
5
170 Views
Last Modified: 2010-03-04
in my dns www.mysite.com and
mysite.com has identical IP-s.
however in the browser typing
www.mysite.com shows site
while mysite.com not.
how should I change settings?
my virtualhosh looks like this:

<VirtualHost www.mysite.com>
DocumentRoot /www/docs/abc
ServerName www.mysite.com
</VirtualHost>

Thanks
0
Comment
Question by:kako
[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 12

Expert Comment

by:lexxwern
ID: 6876531
perhaps create one more virtualhost

<VirtualHost mysite.com>
DocumentRoot /www/docs/abc
ServerName mysite.com
</VirtualHost>

Helped?

lhn
0
 
LVL 15

Expert Comment

by:samri
ID: 6877014
Or, you can skip VirtualHost at all, unless you have other VirtualHost hosted under the same Apache.

Or straight from httpd.conf (mine was Apache 1.3.23 Win32).   This should take care in a scenarios where you clients might be using IP address (most unlikely, but it is possible).

# Use name-based virtual hosting.
#
#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>
0
 
LVL 1

Expert Comment

by:fauzdar
ID: 6890656
you just have to define

<VirtualHost www.mysite.com>
DocumentRoot /www/docs/abc
ServerName www.mysite.com
ServerAlias *.mysite.com
</VirtualHost>

0
 

Author Comment

by:kako
ID: 6891112
what means "*"?
does it means that any
xxx.mysite.com com will be redirected to www.mysite.com,
or only mysite.com?
0
 
LVL 1

Accepted Solution

by:
fauzdar earned 50 total points
ID: 6893875
well it will eliminate the problem of showing www.mysite.com and not showing mysite.com.
0

Featured Post

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

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

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

734 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