logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: virtual host does not resolve to mutliple websites
Author
buffy97ok



Joined: 14 Jun 2011
Posts: 6
Location: long island, ny

PostPosted: Tue 14 Jun '11 1:13    Post subject: virtual host does not resolve to mutliple websites Reply with quote

The way i understand, name based hosts should display content from the appropriate subdirectory specified in the virtual host file. however the following configuration does not reslut in the intended action.

DocumentRoot C:/HostedSites/technoarts.sytes.net/site/web
<Directory C:/HostedSites/technoarts.sytes.net/site/web>

NameVirtualHost 192.168.0.90:85


<VirtualHost 192.168.0.90:85>
ServerName technoarts.sytes.net
DocumentRoot C:/HostedSites/technoarts.sytes.net/site/web
</VirtualHost>

<VirtualHost 192.168.0.90:85>
ServerName crazyfun.sytes.net
DocumentRoot C:/HostedSites/crazyfun.sytes.net/site/web
</VirtualHost>

All host names resolve to the document root directory i.e., technoarts.sytes.net, outside the virtual host directive.

please help
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 14 Jun '11 17:04    Post subject: Re: virtual host does not resolve to mutliple websites Reply with quote

buffy97ok wrote:

All host names resolve to the document root directory i.e., technoarts.sytes.net, outside the virtual host directive.


Means you always get the content from localhost instead of the vhosts content? Did you add this vhosts to httpd.conf or in an include file? if it is an include file how do you include it?
Back to top
buffy97ok



Joined: 14 Jun 2011
Posts: 6
Location: long island, ny

PostPosted: Thu 16 Jun '11 20:21    Post subject: Reply with quote

dear mr. bond:

Thanks for the response.
currently vhost direcives are included at the end of the httpd.conf file. I have tweaked the httpd code in many many ways with absolutely no effect whatsoever. The application just ignores the vhost segment and displays content from the main server documentroot directory for all name based hosts.

If i am not mistaken vhost directive effectively overrides the main server documentroot directory and subsequently retrieves files from the vhost documentroot directory. the only other point to note is the dummy host container code in the begining of the vhost.conf file. i have categorically excluded those lines of code.


Syntactically there are no errors since command prompt execution of both httpd -t and httpd -S result in the display of "syntax OK" message.
So what could I be doing wrong?

once again thanks for spending time with this configuration problem.

buf
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 16 Jun '11 20:55    Post subject: Reply with quote

Well to check also the vhost config use httpd -S

Please post your config at pastebin so we can take a look at it.
Back to top
buffy97ok



Joined: 14 Jun 2011
Posts: 6
Location: long island, ny

PostPosted: Thu 16 Jun '11 21:37    Post subject: Reply with quote

hi again:

i would really appreciate if you can let me know what area of the configuration file is not being implemented properly. I am somewhat certain that a slight modification is what is needed.

totally lost as to why host names are not resolving to the appropriate vhost directed files. windows/....../etc/hosts file has the following entries

127.0.0.1 localhost
127.0.0.1 technoarts.sytes.net
127.0.0.1 crazyfun.sytes.net
127.0.0.1 webhostingcompany.sytes.net
127.0.0.1 manoj.servegame.com
127.0.0.1 venshargroup.sytes.net

Please help.....

Admin note:

The whole config removed, see the forum rules.
And follow the advise from James to use the pastebin link.

Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Thu 16 Jun '11 22:17    Post subject: Reply with quote

The admin removed your config..... cause of the forum rules that's why I told you to post it at pastebin.com ...
Back to top
buffy97ok



Joined: 14 Jun 2011
Posts: 6
Location: long island, ny

PostPosted: Thu 16 Jun '11 23:02    Post subject: Reply with quote

hello again:

posted to pastebin under the title
httpd.conf forum post



thanks
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 17 Jun '11 2:03    Post subject: Reply with quote

along with many other peoples, please give us the direct link
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Fri 17 Jun '11 10:08    Post subject: Reply with quote

Found it, but it will expire in 13 hrs....
http://pastebin.com/LXyCTX2p
Back to top
buffy97ok



Joined: 14 Jun 2011
Posts: 6
Location: long island, ny

PostPosted: Fri 17 Jun '11 20:53    Post subject: Reply with quote

changed the expiration date to never.
same title httpd.conf forum post

sorry no link enclosed because having trouble registering at the pastebin site.

thanks for all the assistance being given at this site.....
Back to top
buffy97ok



Joined: 14 Jun 2011
Posts: 6
Location: long island, ny

PostPosted: Wed 22 Jun '11 21:58    Post subject: problem resolved Reply with quote

the windows system host file entry was the antagonist.

local host is 127.0.0.1...however name based hosts are linked to the ip address of the dedicated web server in the LAN not 127.0.0.1.

perhaps httpd documentation and knowledge base should further elaborate this subject.

Be that as it may with much appreciation we close this transaction and sign off.
Back to top


Reply to topic   Topic: virtual host does not resolve to mutliple websites View previous topic :: View next topic
Post new topic   Forum Index -> Apache