Jetty Virtual Hosting configuration

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Jetty Virtual Hosting configuration

Tim-37
Hello,

I am trying to configure multiple web sites to multiple directories on the web
server, but I cannot figure out the jetty.xml file.

I have read quite a bit about the XML file and the FAQs on mortbay.  I also
have Apache running virtual hosting for about 10 web sites on a single web
server.

I can't seem to figure out how to point a www.abc.com to a directory path and
www.xyz.com to a different path.  This way each web site will have different
content.  Can anyone help?

www.abc.com => /usr/local/jetty/webapps/abc
www.xyz.com => /usr/local/jetty/webapps/xyz

Tim



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Jetty Virtual Hosting configuration

Bruce Lewis-3
Tim <[hidden email]> writes:

> I am trying to configure multiple web sites to multiple directories on the web
> server, but I cannot figure out the jetty.xml file.

Here's how ourdoings.com, my Jetty-powered photo/blog site is
configured.  The "img.b.com" is a hostname I put in /etc/hosts on my
laptop to do testing while not on a network.

  <Call name="addWebApplication">
    <Arg>/</Arg>
    <Arg>./webapps/bigsite</Arg>

    <Set name="extractWAR">false</Set>

    <Set
    name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set>

    <Set name="virtualHosts">
      <Array type="java.lang.String">
        <Item>ourdoings.com</Item>
        <Item>localhost</Item>
      </Array>
    </Set>
  </Call>

  <Call name="addWebApplication">
    <Arg>/</Arg>
    <Arg>./webapps/img</Arg>

    <Set name="extractWAR">false</Set>

    <Set
    name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set>

    <Set name="virtualHosts">
      <Array type="java.lang.String">
        <Item>img.ourdoings.com</Item>
        <Item>img.b.com</Item>
      </Array>
    </Set>
  </Call>

  <Call name="addWebApplication">
    <Arg>/</Arg>
    <Arg>./webapps/redirect</Arg>

    <Set name="extractWAR">false</Set>

    <Set
    name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set>

    <Set name="virtualHosts">
      <Array type="java.lang.String">
        <Item>www.ourdoings.com</Item>
      </Array>
    </Set>
  </Call>

--

http://ourdoings.com/         Easily organize and disseminate news and
                              photos for your family or group.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support