Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Not sure how to set this up.

Joakim:

I'm already running Java 8 on this particular server, so I'm set there. I am going to upgrade to Jetty 9.3.0 as soon as it is released.

I am doing some local testing using RC0 before I do the upgrade on the live server.


On the live server, I am declaratively doing something identical to this:

Server server = new Server();
Server server8360 = new Server();

where the first Server object is listening on port 80 and the second on port 8360.

I want to change that. I have a couple websites sitting at 127.0.0.1:8360 and an Apache httpd listening on port 443 and proxying requests to 127.0.0.1:8360. I did that because Apache supports SNI and Jetty, pre-9.3.0, does not.

To further clarify: here's my start.ini

OPTIONS=Server,websocket,resources,ext
threads.min=10
threads.max=200
threads.timeout=60000
jetty.host=www2-sfo.lobosstudios.com
jetty.port=8100
jetty.dump.start=false
jetty.dump.stop=false

etc/jetty.xml
etc/jetty8360.xml

OPTIONS=jsp
#===========================================================
# HTTP Connector

jetty.port=80
http.timeout=30000
etc/jetty-http.xml
etc/jetty-http8360.xml

# ===========================================================
# Enable servlet 3.1 annotations
# -----------------------------------------------------------

OPTIONS=annotations
etc/jetty-annotations.xml

# ===========================================================
# Enable additional webapp environment configurators
# -----------------------------------------------------------

OPTIONS=plus
etc/jetty-plus.xml

#===========================================================
# Webapplication Deployer
#-----------------------------------------------------------

etc/jetty-deploy.xml
etc/jetty-deploy8360.xml

#===========================================================
# stderr/stdout logging.
# The following configuration will redirect stderr and stdout
# to file which is rolled over daily.
#-----------------------------------------------------------
jetty.log.retain=90
etc/jetty-logging.xml


#===========================================================
# The start.d directory contains the active start.ini fragments
start.d/


jetty.xml defines a server that listens on port 80, with a ServerConnector configured in my jetty-http.xml.

jetty8360.xml defines a server that listens on port 8360, with a ServerConnector configured in jetty-http8360.xml.

Likewise, I have a jetty-deploy.xml that configures Jetty to monitor changes to /usr/local/jetty/webapps and a jetty-deploy8360.xml that configures Jetty to monitor changes to a separate directory, /usr/local/jetty/webapps-8360.

I don't need or want to make any changes to the sites served on port 80. I want to shut down the Apache httpd proxy and uninstall Apache, and take the sites currently running on 127.0.0.1:8360, and have them run on 0.0.0.0:443 instead, and let Jetty serve them directly. I need to set up an ExtendedSslContextFactory so I can take advantage of SNI, since I intend to host more than one SSL website on this server and I only have one IPv4 address and a handful of IPv6 addresses.

Hopefully this clears things up? Let me know if you need further clarification. Thanks for your help.


Joakim Erdfelt wrote:
For starters, SNI is only supported with Java 8 on Jetty 9.3.x

SNI support was added recently, as in the last month.
The Jetty 9.3.0.RC0 release has an early implementation.  urge caution here though its implementation and configuration are still evolving.
Once Jetty 9.3.0 final hits then the support will be blessed and stable.

Also, what do you mean by "each instance"?
Does that mean an instance of Jetty, in its own JVM?
Or something else?

--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Sun, May 17, 2015 at 1:49 AM, Steve Sobol - Lobos Studios <steve@xxxxxxxxxxxxxxxx> wrote:
Ok, I'm a little confused regarding how all of the xml files and start.ini interact in Jetty 9.x.

Here's what I'd like to do

** have an HTTP 1.1 server instance listening on port 80
** have an SNI-enabled server instance listening on port 443
** have separate deployment directories for each instance, into which I will put XML files like this one:

<?xml version="1.0"  encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">

<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Set name="contextPath">/</Set>
  <Set name="war">/var/www/SomeWebsite</Set>
  <Set name="virtualHosts">
    <Array type="String">
      <Item>SomeWebsite.com</Item>
      <Item>www.SomeWebsite.com</Item>
 
    </Array>
  </Set>
</Configure>

and I have something similar working on my production server, but it's running an earlier version of Jetty (9.0.something or 9.1.something) and things look like they've changed significantly (or maybe I'm just tired - it's almost 2am here).

I think my #1 problem is that I'm playing around with 9.3 locally and I can't figure out how to get Jetty to read jetty-ssl-extended-context.xml. It wants to load {jetty.base}/etc/keystore even though I modified jetty-ssl-extended-context.xml to look for the keystore somewhere else.

Help, please? Thanks

--
Lobos Studios - Website and Mobile App Design & Development; IT Support; Computer Maintenance
Toll Free  877.919.4WEB - Apple Valley 760.684.8859 - Los Angeles 310.945.2410 - Cleveland 216.242.4010
www.LobosStudios.com * www.facebook.com/LobosStudios * @LobosStudios


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

--
Lobos Studios - Website and Mobile App Design & Development; IT Support; Computer Maintenance
Toll Free  877.919.4WEB - Apple Valley 760.684.8859 - Los Angeles 310.945.2410 - Cleveland 216.242.4010
www.LobosStudios.com * www.facebook.com/LobosStudios * @LobosStudios


Back to the top