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

Adding a server alias to http.cong 1

Status
Not open for further replies.

bazil2

Technical User
Feb 15, 2010
148
DE
(Elementary User)

I would like my webserver to respond to an alias name.

Currently under the main section, I have the following entry:

ServerName my.domain.com

However, I would also like it to respond to:
After reading the Apache help notes, it would seem I need to make this entry using tags like this:

<VirtualHost>
ServerAlias </VirtualHost>

Have I understood this correctly?

Best regards
 
Yes, for adding a 'www' subdomain that will work. As long as your server responds to mydomain.com, you can specify an alias for sub domain before the .mydomain.com and it will respond.

Do you already have things working on mydomain.com? If not, in order to get that working you need to register with a public DNS and if you are behind a router set up port forwarding.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top