Solved

apache config file

Posted on 2002-03-16
5
173 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

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…
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…
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.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

635 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