Configuring Virtual host in Apache
Configuring Virtual host in Apache
am 10.10.2007 07:42:34 von Sunil Chandrasekharan
Hello,
Can u please help me set up a virtual host in Apache that
points to two different directories on a single machine.
default machine
/usr/local/apache/htdocs
next directory : /usr/local/sunil/index.html
how can i configure my virtual host in Apache to enable me point to
two different directories or two different folders.
Re: Configuring Virtual host in Apache
am 10.10.2007 11:27:51 von Kees Nuyt
On Wed, 10 Oct 2007 05:42:34 -0000, Sunil Chandrasekharan
wrote:
>Hello,
>
> Can u please help me set up a virtual host in Apache that
>points to two different directories on a single machine.
>
>default machine
>
>/usr/local/apache/htdocs
>
>next directory : /usr/local/sunil/index.html
>
>
>how can i configure my virtual host in Apache to enable me point to
>two different directories or two different folders.
We can help, but hey, you decided to manage a webserver,
so shouldn't you try by yourself first?
http://httpd.apache.org/docs/2.2/vhosts/ and the pages it
refers to are quite clear and do contain examples.
If you search the history of this group you will find many
more examples.
If it doesn't work, you can come back here with the error
messages you got and concrete questions.
--
( Kees
)
c[_] My software never has bugs. It just develops random features. (#51)
Re: Configuring Virtual host in Apache
am 11.10.2007 08:20:08 von David McKenzie
Kees Nuyt wrote:
> On Wed, 10 Oct 2007 05:42:34 -0000, Sunil Chandrasekharan
> wrote:
>
>> Hello,
>>
>> Can u please help me set up a virtual host in Apache that
>> points to two different directories on a single machine.
>>
>> default machine
>>
>> /usr/local/apache/htdocs
>>
>> next directory : /usr/local/sunil/index.html
>>
>>
>> how can i configure my virtual host in Apache to enable me point to
>> two different directories or two different folders.
>
> We can help, but hey, you decided to manage a webserver,
> so shouldn't you try by yourself first?
>
> http://httpd.apache.org/docs/2.2/vhosts/ and the pages it
> refers to are quite clear and do contain examples.
> If you search the history of this group you will find many
> more examples.
>
> If it doesn't work, you can come back here with the error
> messages you got and concrete questions.
Don't you think after reading the fmanual, he should then Google? Usenet
is not a personalised Google.
Then again, perhaps I missed a memo.
--
DM davidm@cia.com.au
'It would go against respecting principles and truth if you have to
respect and accept anything just because it is the other side's view.'
- Kim Jung Ill
Re: Configuring Virtual host in Apache
am 11.10.2007 13:48:44 von Kees Nuyt
On Thu, 11 Oct 2007 16:20:08 +1000, David McKenzie
wrote:
>Kees Nuyt wrote:
>> On Wed, 10 Oct 2007 05:42:34 -0000, Sunil Chandrasekharan
>> wrote:
>>
[snip]
>>> how can i configure my virtual host in Apache to enable me point to
>>> two different directories or two different folders.
>>
>> We can help, but hey, you decided to manage a webserver,
>> so shouldn't you try by yourself first?
>>
>> http://httpd.apache.org/docs/2.2/vhosts/ and the pages it
>> refers to are quite clear and do contain examples.
>> If you search the history of this group you will find many
>> more examples.
>>
>> If it doesn't work, you can come back here with the error
>> messages you got and concrete questions.
>
>Don't you think after reading the fmanual, he should then Google? Usenet
>is not a personalised Google.
Yes, you are right. That's why I said: "If you search the
history of this group you will find many more examples."
I meant, search Google groups.
>Then again, perhaps I missed a memo.
I didn't see more articles in this thread. You wrote the
third one ;)
--
( Kees
)
c[_] Building Contractors, not to be confused with homemakers (#90)
Re: Configuring Virtual host in Apache
am 24.10.2007 02:05:57 von salmalalji
On Oct 9, 10:42 pm, Sunil Chandrasekharan
wrote:
> Hello,
>
> Can u please help me set up a virtual host in Apache that
> points to two different directories on a single machine.
>
> default machine
>
> /usr/local/apache/htdocs
>
> next directory : /usr/local/sunil/index.html
>
> how can i configure my virtual host in Apache to enable me point to
> two different directories or two different folders.
I also would like to know how its done. I have one IP address but
would like virtual hosts to be able to redirect the traffic to the
correct folder depending on the url. i have read the apache docs, but
the config still doesnt work
NameVirtualHost *:80
Options All -Indexes
DocumentRoot /var/www/html/example.one.com
ServerName www.example.one.com
ErrorLog logs/error_log
CustomLog logs/access_log combined
ServerAdmin salma@wisecrack.ca
DocumentRoot /var/www/html/dev.example.one.com
ServerName dev.example.one.com
ErrorLog logs/dev_error_log
CustomLog logs/dev_access_log combined
Re: Configuring Virtual host in Apache
am 24.10.2007 11:15:11 von Kees Nuyt
On Tue, 23 Oct 2007 17:05:57 -0700, salmalalji@gmail.com
wrote:
>On Oct 9, 10:42 pm, Sunil Chandrasekharan
>wrote:
>> Hello,
>>
>> Can u please help me set up a virtual host in Apache that
>> points to two different directories on a single machine.
>>
>> default machine
>>
>> /usr/local/apache/htdocs
>>
>> next directory : /usr/local/sunil/index.html
That's not a directory.
>> how can i configure my virtual host in Apache to enable me point to
>> two different directories or two different folders.
>
>I also would like to know how its done. I have one IP address but
>would like virtual hosts to be able to redirect the traffic to the
>correct folder depending on the url. i have read the apache docs, but
>the config still doesnt work
>
>NameVirtualHost *:80
>
> Options All -Indexes
>
>
>
>
> DocumentRoot /var/www/html/example.one.com
> ServerName www.example.one.com
> ErrorLog logs/error_log
> CustomLog logs/access_log combined
>
>
>
> ServerAdmin salma@wisecrack.ca
> DocumentRoot /var/www/html/dev.example.one.com
> ServerName dev.example.one.com
> ErrorLog logs/dev_error_log
> CustomLog logs/dev_access_log combined
>
The config looks ok.
Anything in the logs?
Did you restart apache after the changes?
Does it run? Or does it refuse to start due to other
errors. Running httpd -t will check the correctness of
httpd.conf.
Do the directories actually contain a default document
(e.g. index.html or whatever you defined)?
Do the requests reach your box to begin with?
--
( Kees
)
c[_] Dyslexics of the World, Untie! (#457)