Virtual hosts

This is a discussion on Virtual hosts within the Apache Web Server forums, part of the Web Server and Related Forums category; I have used the examples in apache docs and from various web sites on the web (Google search) to set ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-25-2005
Gary
 
Posts: n/a
Default Virtual hosts

I have used the examples in apache docs and from various web sites on the
web (Google search) to set virtual hosts to no avail.

Presently I have:

#
#Use name-based virtual hosting.
#
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot C:/www/Apache2/htdocs/dreammaster
ServerName www.dreammaster.info
ServerAlias dreammaster.info dreammaster
ErrorLog logs/dreammaster.log
</VirtualHost>

<VirtualHost *:80>
DocumentRoot C:/www/Apache2/htdocs/owlnet
ServerName www.owlnet.net
ServerAlias owlnet.net owlnet
ErrorLog logs/owlnet.log
</VirtualHost>

The path to htdocs is set correctly. I can connect using 127.0.0.1 to get to
the apache test/start page ok.

The document roots are set correctly in the above.

The path to htdocs is: C:\www\Apache2\htdocs

Can someone tell me ehat I have done wrong here as I can not access either
site.

Thanks


  #2 (permalink)  
Old 04-26-2005
Gary
 
Posts: n/a
Default Re: Virtual hosts


"Davide Bianchi" <davideyeahsure@onlyforfun.net> wrote in message
news:slrnd6q59p.12a.davideyeahsure@fogg.onlyforfun .net...
> On 2005-04-25, Gary <spam@spamcop.net> wrote:
>> ErrorLog logs/dreammaster.log

>
> The errorlog should report the complete path of the file.


OK, thank you!

>> The path to htdocs is set correctly. I can connect using 127.0.0.1 to get
>> to
>> the apache test/start page ok.

>
> This is already wrong, when you enable VirtualHost the 'default' is
> to give you the first VHost defined, if going to 127.0.0.1 brings you the
> test page, it means that is not reading your Virtual Host definition.


:(

>> Can someone tell me ehat I have done wrong here as I can not access
>> either
>> site.

>
> Did you restarted Apache after changing the config file?
> If you run httpd -t what does it says?


I use the command prompt to cd to c:www\apache2\
Then I typed "httpd -t"
It says, "httpd is not recognized as an internal or external command,
operable file, or batch file"

Thanks for the response thus far.


  #3 (permalink)  
Old 05-20-2005
YouCanToo
 
Posts: n/a
Default Re: Virtual hosts

Davide Bianchi wrote:
> On 2005-04-26, Gary <spam@spamcop.net> wrote:
>
>>I use the command prompt to cd to c:www\apache2\

>
>
> I've never used Apache on Windows, check the documentation for the
> equivalent command on Windows of the -t, to Test the configuration
> file.
>
> Davide
>

if you are using Version 2.xx of Apache then you would use httpd2 -t
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:34 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0