?
Solved

How do I solve the http:// verse www. problem for virtual hosts?

Posted on 2006-11-17
2
Medium Priority
?
185 Views
Last Modified: 2010-03-04
I have a virtual host that uses domainname.com. Problem is that only www.domainname.com works, but not http://domainname.com doesn't work. I tried scriptalias *.domainname.com, but that didn't work. Heres how my config file looks like:

NameVirtualHost *:80

<VirtualHost *:80>
   ServerName domainname.com
   ServerAlias *.domainname.com
   DocumentRoot /my/www
</VirtualHost>

How do I solve this? Pls help. Thanks in advance for all the help.
0
Comment
Question by:bemara57
[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
2 Comments
 
LVL 27

Accepted Solution

by:
caterham_www earned 2000 total points
ID: 17966713
> but not http://domainname.com doesn't work.

Does domainname.com resolve to your server (DNS,> name server entry)?

ServerName domainname.com should match taht request, your ServerAlias should match www.domainname.com 
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 17966738
I agree with caterham_www - there are two things that must resolve properly in order for a web site to come up as both www.domain.com and domain.com:

(1) dns for www.domain.com and domain.com has to resolve to the server
(2) the web site configuration file has to accomodate both www.domain.com and domain.com

You have (2), is it possibly set up differently for (1)?
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…
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 …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month8 days, 1 hour left to enroll

765 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