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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
"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. |
|
|||
|
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 |