Solved

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

Posted on 2006-11-17
2
178 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
2 Comments
 
LVL 27

Accepted Solution

by:
caterham_www earned 500 total points
Comment Utility
> 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
Comment Utility
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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

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 …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 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