Different hostnames on one server

They have: 1 posts

Joined: Nov 2006

Hi, I'm doing some research on selecting a domain name, and I have two hopefully simple questions. Say I want to have two different websites on one computer. The sites would share the same top and second-level domains but would have different hostnames. Is this possible? To make sure I 'm being clear, here is an example of what I want:
site1.example.com
site2.example.com
Can I have both these sites on the same computer? If so, my server is running Debian, does anyone know how I would go about setting this up? Thank you for your time.

FrankR's picture

He has: 45 posts

Joined: Oct 2006

Sure, you can have multiple host names on a single machine. That's called virtual hosting. Check out your web server documentation on how to configure it. In Apache, it is easy to set up in the httpd.conf file. Generally, each service must be configured separately to deal with the several hostnames.

Author of SQL Converter for Excel, which is an Excel add-in for converting data to MySQL.

Finntroll's picture

They have: 135 posts

Joined: Sep 2006

Blazeix;209966 wrote: Hi, I'm doing some research on selecting a domain name, and I have two hopefully simple questions. Say I want to have two different websites on one computer. The sites would share the same top and second-level domains but would have different hostnames. Is this possible? To make sure I 'm being clear, here is an example of what I want:
site1.example.com
site2.example.com
Can I have both these sites on the same computer? If so, my server is running Debian, does anyone know how I would go about setting this up? Thank you for your time.

You can al ot of sites on one computer, but not hostnames. In your example
site1.example.com
site2.example.com
site1 and site2 third level domains.

Fram rider trollens kung
Med vargbroder ut pе jakt

FrankR's picture

He has: 45 posts

Joined: Oct 2006

Hey Ruth:

Great catch! I had thought Blazeix was using "hostname" in the DNS sense. You correctly point out that the terminology might be confusing in the face of the system's hostname. However, NetCraft still counts domains as hosts Wink

Frank

Author of SQL Converter for Excel, which is an Excel add-in for converting data to MySQL.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.