Solved

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

Posted on 2006-11-17
2
181 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
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
browser caching 4 71
NGINX/Plesk  subdomain allow only 5 select ip addresses, deny everyone else 2 88
whm high memory usage in processes 7 89
wamp versus xampp 4 61
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

810 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