LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-13-2010, 01:38 PM   #1
MeccaOz
LQ Newbie
 
Registered: Mar 2010
Posts: 5

Rep: Reputation: 0
Webserver domain name (www)


Hi everyone !
I am setting up a webserver, and have pretty much got the domain name working after following this tutorial http://www.debian-administration.org/articles/412 on virtual hosting.

ok so i can reach my domain using domainexample.com in the browser but if i use www.domainexample.com I thought id try to setup another virtual host pointing to the same doc root (using the www) but that didnt seem to work, anyone have any ideas?
 
Old 03-13-2010, 02:19 PM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
No. ServerName www.domainexample.com, ServerAlias domainexample.com. It's one virtual host.
dns for www.domainexample.com configured correctly?

Last edited by troop; 03-13-2010 at 02:23 PM.
 
Old 03-13-2010, 02:45 PM   #3
MeccaOz
LQ Newbie
 
Registered: Mar 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Hi troop !

this is my virtual host file

<VirtualHost *>
ServerAdmin webmaster@example.com
ServerName www.exampledomain.com
ServerAlias exampledomain.com

# Indexes + Directory Root.
DirectoryIndex index.html
DocumentRoot /var/www/exampledomain.com/htdocs/

# CGI Directory
ScriptAlias /cgi-bin/ /var/www/exampledomain.com/cgi-bin/
<Location /cgi-bin>
Options +ExecCGI
</Location>


# Logfiles
ErrorLog /var/www/exampledomain.com/logs/error.log
CustomLog /var/www/exampledomain.com/logs/access.log combined
</VirtualHost>

I can get to the domain via typing exampledomain.com but not www.exampledomain.com which I kinda expected, but have no idea how to make it so, sorry if im not making sence.. no sleep, long time.
 
Old 03-13-2010, 02:55 PM   #4
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
Config appear correct.
output of "# host www.exampledomain.com" shows right ip?
What in /var/www/exampledomain.com/logs/access.log?

Last edited by troop; 03-13-2010 at 02:56 PM.
 
Old 03-13-2010, 03:18 PM   #5
MeccaOz
LQ Newbie
 
Registered: Mar 2010
Posts: 5

Original Poster
Rep: Reputation: 0
hmm you may be onto something troop, I have a feeling my dns hasnt propagated fully yet, I might leave it for a day and see what happens.
Thanks for your help )
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS http:domain.com resolve to www.domain.com keysorsoze Linux - Networking 3 02-12-2007 03:03 AM
Redirecting domain.com to www.domain.com rustyz82 Linux - General 3 05-18-2006 03:41 AM
Cant get entry in bind to work with domain.com instead of www.domain.com pxes351 Linux - Networking 12 05-09-2005 06:20 AM
Webserver without www prefix da_tibmeister Linux - Networking 2 08-08-2004 09:07 AM
What is the correct Samba permission to my webserver /www directory? how to piratebiter Linux - General 1 09-21-2003 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration