How do I use VirtualHost?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

How do I use VirtualHost?

Postby KingNoob » 14. December 2006 07:22

Hey All,

I am noob at VirtualHost because I am new to this module.

I will be using kingnoob.com as my example

Anyway, a few questions I would like to ask:

1. Can I use subdomains like (blah.kingnoob.com) in virtualhost like this:

Code: Select all
<VirtualHost *:80>
ServerName blah.kingnoob.com
ServerAlias www.blah.kingnoob.com
...
...
</VirtualHost>


2. Can I use the HOST file to create my domain in the localhost itself like this:

Code: Select all
127.0.0.1           kingnoob.com www.kingnoob.com


3. Can I use the VirtualHost to create a subdomain and edit the HOST file respectively?

Apache:
Code: Select all
<VirtualHost *:80>
ServerName blah.kingnoob.com
ServerAlias www.blah.kingnoob.com
...
...
</VirtualHost>


And

HOST:
Code: Select all
127.0.0.1 blah.kingnoob.com www.blah.kingnoob.com
127.0.0.1 www.kingnoob.com kingnoob.com


Please help! Thanks! :D
KingNoob
 
Posts: 5
Joined: 12. December 2006 15:24

Return to XAMPP for Windows

Who is online

Users browsing this forum: Gharas and 67 guests