This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Webmaster forum > July 2007 > Apache - New Domain? - Kindly Advice
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Apache - New Domain? - Kindly Advice
|
|
| mumebuhi 2007-07-30, 10:16 pm |
| First of all, sorry if this is a newbie's question. I have a question
about Apache.
This is what I usually do. I store pages in the DocumentRoot
directory. For example, I put 'hello.html' in /var/www/html
(DocumentRoot) directory. The the page is viewable at
http://www.somehost.com/hello.html.
#1
How do I make a new "domain", e.g. cool.somehost.com? Can it be served
by the same Apache? Is this what is called "virtual host"?
#2
How do I set the new "domain", e.g. cool.somehost.com to point to /var/
www/html/cool?
Thank you.
Buhi
| |
| Jerry Stuckle 2007-07-30, 10:16 pm |
| mumebuhi wrote:
> First of all, sorry if this is a newbie's question. I have a question
> about Apache.
>
> This is what I usually do. I store pages in the DocumentRoot
> directory. For example, I put 'hello.html' in /var/www/html
> (DocumentRoot) directory. The the page is viewable at
> http://www.somehost.com/hello.html.
>
> #1
> How do I make a new "domain", e.g. cool.somehost.com? Can it be served
> by the same Apache? Is this what is called "virtual host"?
> #2
> How do I set the new "domain", e.g. cool.somehost.com to point to /var/
> www/html/cool?
>
> Thank you.
>
>
> Buhi
>
Yes, you need to set up a new virtual host. I have several domains
running on one apache.
The actual configuration can be rather complicated, but assuming you're
already set up for named virtual hosts, simple one might be something like
<VirtualHost *:80>
ServerName cool.example.com
DocumentRoot "/var/www/html/cool"
</VirtualHost>
But there are a lot of other options you may need, also. You need to
read the Apache doc - there are a lot of different options, and not
having the right ones can cause you a lot of headaches. I found it
pretty hard to get the first one right. The second was easier. By now
it's pretty easy, but I still wouldn't call myself an expert. In fact,
far from it.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
| |
| Jerry Stuckle 2007-07-30, 10:16 pm |
| mumebuhi wrote:
> First of all, sorry if this is a newbie's question. I have a question
> about Apache.
>
> This is what I usually do. I store pages in the DocumentRoot
> directory. For example, I put 'hello.html' in /var/www/html
> (DocumentRoot) directory. The the page is viewable at
> http://www.somehost.com/hello.html.
>
> #1
> How do I make a new "domain", e.g. cool.somehost.com? Can it be served
> by the same Apache? Is this what is called "virtual host"?
> #2
> How do I set the new "domain", e.g. cool.somehost.com to point to /var/
> www/html/cool?
>
> Thank you.
>
>
> Buhi
>
BTW - when referencing unknown domains, please use example.com,
example.org, etc. That's what they were reserved for.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
| |
| Scott Bryce 2007-07-30, 10:16 pm |
| mumebuhi wrote:
> #1
> How do I make a new "domain", e.g. cool.somehost.com? Can it be served
> by the same Apache? Is this what is called "virtual host"?
It is called a subdomain. Yes, it can be served by the same Apache. Are
you on a shared host with a control panel? If so , it would be easiest
to set this up via the control panel.
| |
| mumebuhi 2007-07-31, 3:17 am |
| On Jul 30, 6:58 pm, Scott Bryce <sbr...@scottbryce.com> wrote:
> mumebuhi wrote:
>
> It is called a subdomain. Yes, it can be served by the same Apache. Are
> you on a shared host with a control panel? If so , it would be easiest
> to set this up via the control panel.
I am running a Linux box with Apache 2 installed :) so I have a full
control (well... if I know enough how to control it).
Buhi
| |
| mumebuhi 2007-07-31, 3:17 am |
| On Jul 30, 6:35 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> mumebuhi wrote:
>
>
>
>
>
> Yes, you need to set up a new virtual host. I have several domains
> running on one apache.
>
> The actual configuration can be rather complicated, but assuming you're
> already set up for named virtual hosts, simple one might be something like
> <VirtualHost *:80>
> ServerName cool.example.com
> DocumentRoot "/var/www/html/cool"
> </VirtualHost>
>
Thanks for the reply.
I think I need to start with the assumption first. Do I need to set up
a named virtual host before adding the <VirtualHost> directive above?
| |
| Jerry Stuckle 2007-07-31, 3:17 am |
| mumebuhi wrote:
> On Jul 30, 6:35 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>
> Thanks for the reply.
> I think I need to start with the assumption first. Do I need to set up
> a named virtual host before adding the <VirtualHost> directive above?
>
>
>
>
Yes.
BTW - I'm willing to try to help you, but you'll probably get better
answers in alt.apache.configuration. Your questions are part of the
focus of that group.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
| |
| mumebuhi 2007-07-31, 6:17 pm |
| Thank you, Jerry. I will check that group.
Buhi
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|