It may be different on other distros, but Apache on CentOS makes good use of the /etc/httpd/conf.d folder, whereby you create new files (such as test.ucauk.org.conf) to describe particular subdomains (Virtual Webservers). This way, only the default Virtual Webserver is in the main httpd.conf file, and even that can be taken out :)

For example, I use /etc/httpd/conf.d/pjlewis.org.conf to redirect http://pjlewis.org to http://www.pjlewis.org:

NameVirtualHost *:80
<VirtualHost *:80>
        ServerName pjlewis.org
    redirect Permanent / http://www.pjlewis.org/
</VirtualHost>

Then I setup www.pjlewis.org in /etc/httpd/conf.d/www.pjlewis.org.conf:

<VirtualHost *:80>
        DocumentRoot /var/www/pjlewis.org
        ServerName www.pjlewis.org
    ServerAlias *.pjlewis.org
        ErrorDocument 403 /error/noindex.html
    <Directory "/var/www/pjlewis.org">
        Options FollowSymLinks MultiViews
    </Directory>
</VirtualHost>

This method works very well for me, and is quite flexible. I find it easier to track my subdomains by files in the conf.d folder, rather than entries in httpd.conf, but each to their own :)

Apache has a wealth of documentation online, but you can also find some great examples of best practices with google. I would suggest taking Apache a step at a time to get to the final setup you want. Don't forget to restart httpd in between config file changes :)

Paul

ludo1960@lycos.co.uk wrote:
Just found the Reply to all button! Honest!

What chance have I got with Apache.......:)



  
From:: "Graham Bleach" <graham@darkskills.org.uk>
To: users@lists.bitfolk.com
Subject: Re: [bitfolk] Was looking for...
Date: Tue, 4 Nov 2008 21:00:07 +0000
    

  
Hi,

2008/11/4  <ludo1960@lycos.co.uk>:
    
a link to reply to my DNS question?????

So my wee problem is not a DNS one, so logically Apache 2 is the next
      
port
    
of call :)
      
I can't really help unless you answer Andy's question in your previous
thread. I still have no idea what you expect to happen when you visit
test.ucanuk.org, so there's no way I can help.

It would also help if you replied to previous emails in the same
conversation, rather than composing a new mail to the list with a
different subject. Many list subscribers use the option in our mail
clients to display email in a conversation, or threaded view.
Composing a brand new email breaks our conversation view.

Instead of creating a brand new mail to the list, please open the mail
you are replying to or adding information to and hit "reply all" to
ensure it goes to the list address.

Thanks,
Graham

_______________________________________________
users mailing list
users@lists.bitfolk.com
<a target="_blank"
href='http://lists.bitfolk.com/mailman/listinfo/users'>http://lists.bitfolk.
com/mailman/listinfo/users</a>

_______________________________________________ users mailing list users@lists.bitfolk.com http://lists.bitfolk.com/mailman/listinfo/users