Stupid Vhost... please help

This is a discussion on Stupid Vhost... please help within the Apache Web Server forums, part of the Web Server and Related Forums category; Before I get yelled at and told that this has been delt with tons of times, I;ve read the ...


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 12-11-2003
K-Parker
 
Posts: n/a
Default Stupid Vhost... please help

Before I get yelled at and told that this has been delt with tons of times,
I;ve read the manual, I've read all the posts, but I think I'm just missing
something here.. and hopefully another set of eyes can pick up what I'm
missing...
also I had this working once... then I had to re-install apache and now it
doesn't work...

well it works, but it all goes to the main page's index file...

Do I need to comment out the other listen and documentroot to make this work
also if I ping either name below I dont get a response it says it cannot
find it...

also if I ping my IP I get a response, but if I ping the servername I get a
"cannot find host please check spelling... " error


and if it helps any the conf file can be viewed at
http://www.karmparker.com/httpd.conf

Thanks in advance...


Listen 80
Listen 8081
Listen 8082

NameVirtualHost *

<VirtualHost *:8081>
ServerName caferisko
DocumentRoot "c:/web/028_caferisko"
</VirtualHost>

<VirtualHost *:8082>
ServerName vig
DocumentRoot "c:/web/025-leikin"
</VirtualHost>



  #2 (permalink)  
Old 12-11-2003
Naughty Nikki
 
Posts: n/a
Default Re: Stupid Vhost... please help

The NameVirtualHost and <VirtualHost> have to match exactly and I think the
servername needs to be complete

Try:

NameVirtualHost * <--- if no port assignment here

<VirtualHost *> <--- then not here either
ServerName caferisko <--- what is this? caferisko.domain.com ???
www.caferisko.com ??? fix it
DocumentRoot "c:/web/028_caferisko"
</VirtualHost>

<VirtualHost *>
ServerName vig
DocumentRoot "c:/web/025-leikin"
</VirtualHost>







"K-Parker" <newsgroup@karmparker.com> wrote in message
news:3ROBb.77$3g3.26674281@news.nnrp.ca...
> Before I get yelled at and told that this has been delt with tons of

times,
> I;ve read the manual, I've read all the posts, but I think I'm just

missing
> something here.. and hopefully another set of eyes can pick up what I'm
> missing...
> also I had this working once... then I had to re-install apache and now it
> doesn't work...
>
> well it works, but it all goes to the main page's index file...
>
> Do I need to comment out the other listen and documentroot to make this

work
> also if I ping either name below I dont get a response it says it cannot
> find it...
>
> also if I ping my IP I get a response, but if I ping the servername I get

a
> "cannot find host please check spelling... " error
>
>
> and if it helps any the conf file can be viewed at
> http://www.karmparker.com/httpd.conf
>
> Thanks in advance...
>
>
> Listen 80
> Listen 8081
> Listen 8082
>
> NameVirtualHost *
>
> <VirtualHost *:8081>
> ServerName caferisko
> DocumentRoot "c:/web/028_caferisko"
> </VirtualHost>
>
> <VirtualHost *:8082>
> ServerName vig
> DocumentRoot "c:/web/025-leikin"
> </VirtualHost>
>
>
>




  #3 (permalink)  
Old 12-11-2003
Robi
 
Posts: n/a
Default Re: Stupid Vhost... please help

K-Parker wrote:
[...]


>
> Listen 80
> Listen 8081
> Listen 8082
>
> NameVirtualHost *
>
> <VirtualHost *:8081>
> ServerName caferisko
> DocumentRoot "c:/web/028_caferisko"
> </VirtualHost>
>
> <VirtualHost *:8082>
> ServerName vig
> DocumentRoot "c:/web/025-leikin"
> </VirtualHost>
>


http://httpd.apache.org/docs/vhosts/examples.html

<<
Setup 4: You have multiple domains going to the same IP and also want to serve multiple ports. By defining the ports in the
"NameVirtualHost" tag, you can allow this to work. If you try using <VirtualHost name:port> without the NameVirtualHost name:port or
you try to use the Port directive, your configuration will not work.
Server configuration:

...
NameVirtualHost 111.22.33.44:80
NameVirtualHost 111.22.33.44:8080

<VirtualHost 111.22.33.44:80>
ServerName www.domain.tld
DocumentRoot /www/domain-80
</VirtualHost>

<VirtualHost 111.22.33.44:8080>
ServerName www.domain.tld
DocumentRoot /www/domain-8080
</VirtualHost>

<VirtualHost 111.22.33.44:80>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain-80
</VirtualHost>

<VirtualHost 111.22.33.44:8080>
ServerName www.otherdomain.tld
DocumentRoot /www/otherdomain-8080
</VirtualHost>
>>


in your case:

Listen 80
Listen 8081
Listen 8082

# NameVirtualHost *:80 # unclear if this one is needed since you don't have one below
NameVirtualHost *:8081
NameVirtualHost *:8082


<VirtualHost *:8081>
ServerName caferisko
DocumentRoot "c:/web/028_caferisko"
</VirtualHost>

<VirtualHost *:8082>
ServerName vig
DocumentRoot "c:/web/025-leikin"
</VirtualHost>


HTH

--
Robi

 


Thread Tools
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

vB 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 06:17 AM.


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