Nope don't agree its expected behaviour something is a miss you should be
able to have to different host headers pointing to different folders and it
should be looking at that.
In my instance accessing by ip will give me my wwwroot, accessing by either
of the host headers should be returning back each of the hosts.
Heres my config extract on my local machine.
try moving the folder outside tomcat web apps directory just to rule that
its not doing some weirdness
/opt/wwwroot/siteA
/opt/wwwroot/siteB
Heres my sample config to see if it helps at all I run exactly as you
describe I have opened installed using single instance install as per the
instructions on the wiki
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web
applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<Context path="" docBase="/Users/alex/Sites/wwwroot" />
</Host>
<Host name="messagepipes.local" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/Users/alex/Sites/wwwroot/messagepipes" />
<!-- Makes the actual client IP passed through rather than HAProxy IP -->
<Valve
className="org.apache.catalina.valves.RemoteIpValve" />
</Host>
<Host name="redirectm.local" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Context path=""
docBase="/Users/alex/Sites/wwwroot/redirectm" />
<!-- Makes the actual client IP passed through rather than HAProxy IP -->
<Valve
className="org.apache.catalina.valves.RemoteIpValve" />
</Host>
</Engine>
Cheers
Alex
On 10 November 2011 22:30, Matthew Woodward <[email protected]> wrote:
> On Thu, Nov 10, 2011 at 2:24 PM, Matt C <[email protected]> wrote:
>
>> ----------------------
>>
>> <Host name="openbd.local" appBase="webapps"
>> unpackWARs="true" autoDeploy="true"
>> xmlValidation="false" xmlNamespaceAware="false">
>> <Context path="" docBase="/opt/openbd/tomcat/webapps/SiteA" />
>> </Host>
>>
>> ----------------------
>>
>
> Your issue is that since openbd.local points to your local host and you're
> hitting the port directly, you can browse to all your sites via
> http://openbd.local:8888/site because openbd.local:8888 just hits the
> tomcat root, and the appbase for all your sites is under webapps. So that's
> completely expected behavior.
>
> To put it another way, would it surprise you to be able to hit everything
> via 127.0.0.1:8888/site? Same difference.
>
>
>>
>> So by my understanding, http://openbd.local:8888/ should take me to
>> SiteA, and adding anything after the '/' should go to subdirectories
>> within SiteA, right? What's blowing my mind though is that both
>> http://openbd.local:8888/index.cfm and
>> http://openbd.local:8888/SiteA/index.cfm
>> take me to the exact same page,
>
>
> Again, because once you hit the port you can hit everything under webapps
> unless you've segregated things differently.
>
>
>> and I can also navigate to
>> http://openbd.local:8888/SiteB/index.cfm to see what's in SiteB, even
>> though my Host's docBase points inside SiteA. So what am I missing if
>> I want to have two independent sites in a single OpenBD instance?
>>
>
> You're not missing anything. This is just how stuff works unless you set
> up your configuration differently.
>
> --
> Matthew Woodward
> [email protected]
> http://blog.mattwoodward.com
> identi.ca / Twitter: @mpwoodward
>
> Please do not send me proprietary file formats such as Word, PowerPoint,
> etc. as attachments.
> http://www.gnu.org/philosophy/no-word-attachments.html
>
> --
> official tag/function reference: http://openbd.org/manual/
> mailing list - http://groups.google.com/group/openbd?hl=en
>
--
Alex Skinner
Managing Director
Pixl8 Interactive
Tel: +448452600726
Email: [email protected]
Web: pixl8.co.uk
--
official tag/function reference: http://openbd.org/manual/
mailing list - http://groups.google.com/group/openbd?hl=en