?
Solved

apache config file

Posted on 2002-03-16
5
Medium Priority
?
175 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 200 total points
ID: 6893875
well it will eliminate the problem of showing www.mysite.com and not showing mysite.com.
0

Featured Post

Plug and play, no additional software required!

The ATEN UE3310 USB3.1 Gen1 Extender Cable allows users to extend the distance between the computer and USB devices up to 10 m (33 ft). The UE3310 is a high-quality, cost-effective solution for professional environments such as hospitals, factories and business facilities.

Question has a verified solution.

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

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

719 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