Solved

apache config file

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now