Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setup Apache so Virtual host website can be access without typing www. 1

Status
Not open for further replies.

iteach2

Technical User
Sep 16, 2001
120
US
Hi Gurus,

I have set up multiple virtual host and would like for them to be able to be pulled up without typing www. in the web address. Ex. Instead of typing you can just put mywebsite.com and it the name will resolve.

I am currently using the the following;

Code:
<VirtualHost *:80>
    ServerAdmin me@email.com
    DocumentRoot C:\webs\mysite.com
    ServerName [URL unfurl="true"]www.mysite.com[/URL]
    ServerAlias mysite.com *.mysite.com
    ErrorLog logs/mysite.com-error_log
    CustomLog logs/mysite.com-access_log common
    <Directory D:\webs\mysite.com>
    	    Options Indexes FollowSymLinks +Includes +ExecCGI
	    AllowOverride None
    	    Order allow,deny
	    Allow from all
	</Directory>
</VirtualHost>

Is there anything I need to change or add?
 
The ServerName & ServerAlias are what you need for apache & that looks correct. I'm not sure about the *.mysite.com though, I'm not sure that apache will accept wildcards this way.

The additional item that will be needed is not related to apache - correct DNS resolution set for both mysite.com &
 
Thank smah,

I heard that about the DNS but was unsure. Thank you for clearing that up for me. I appreciate your time. [bigsmile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top