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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I set up a subdomain on my server?

VirtualHosts

How do I set up a subdomain on my server?

by  Wullie  Posted    (Edited  )
The following explains how to set up subdomains on your server. This assumes that you already have virtualhosts set up and working, if not read that FAQ first!! Also, your dns must resolve any requests for this subdomain to your server.

The following is just the same set up as a normal virtualhost but you are using the subdomain name instead of just the server name.

<VirtualHost *:80>
UseCanonicalName off
ServerName www.whatever.domain.co.uk
ServerAlias whatever.domain.co.uk
ServerAdmin webmaster@domain.co.uk
DocumentRoot /www/domain1
ScriptAlias /cgi-bin/ "C:/www/domain1/cgi-bin/"
ErrorLog logs/domain1/error.log
CustomLog logs/domain1/access.log common
CustomLog logs/domain1/referer.log referer
CustomLog logs/domain1/agent.log agent
ServerSignature EMail
</VirtualHost>

Hope this helps

Wullie

sales@freshlookdesign.co.uk
www.freshlookdesign.co.uk
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top