Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-users] Can't get aliases work within contexts / virtual hosts

Hello everyone,

I'm using the latest jetty 7.3.1 on linux and want to use
aliases/symlinks within
virtual hosts like it always has worked without vhosts. The
virtual-hosts itself work
fine, only the aliases aren't served. I see the "WARN::Aliased
resource .." in the log.

I start jetty with
-Dorg.eclipse.jetty.util.resource.FileResource.checkAliases=False
and in the WebAppContext I've set aliases to true (see below), the same in
etc/webdefault.xml.

My contexts from <jetty-home>/contexts look like this:

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Set name="contextPath">/</Set>
  <Set name="resourceBase"><SystemProperty
name="jetty.home"/>/webapps/app1</Set>
  <Set name="virtualHosts">
    <Array type="java.lang.String">
      <Item>www.mydomain.com</Item>
    </Array>
  </Set>
  <Set name="aliases">true</Set>
</Configure>

and the same for a second vhost /webapps/app2 also with the contextPath "/"

Within webapps/app1/ there is a symlink to a dir outside webapps.
Symlinks in an app loaded by the WebAppProvider (in jetty-webapp.xml)
instead of contexts
recognize the setting in the webdefault.xml and serve aliases.

I start jetty with an the jetty.xml, jetty-deploy.xml and
jetty-contexts.xml (only modified the connector
in jetty.xml)

Any ideas?

Thanks


Back to the top