Change Jetty default port

前端 未结 10 1247
野性不改
野性不改 2020-12-29 04:15

Jetty default port is 8080, but I want to change to default port to some other port (9999).

I read a few tutorials and they said almost all of configuration informa

10条回答
  •  佛祖请我去吃肉
    2020-12-29 05:10

    On jetty 9.2.3.v20140905 it`s need to write in /etc/default/jetty

    # JETTY_ARGS
    #   The default arguments to pass to jetty.
    #   For example
    JETTY_ARGS="jetty.port=8080 jetty.spdy.port=8443 jetty.secure.port=443"
    

    but this change only http port. To change https port in jetty 9.2 create ini file $JETTY_HOME/start.d/https.ini

    # Initialize module https
    #
    --module=https
    ## HTTPS Configuration
    # HTTP port to listen on
    https.port=8443
    # HTTPS idle timeout in milliseconds
    https.timeout=30000
    # HTTPS Socket.soLingerTime in seconds. (-1 to disable)
    # https.soLingerTime=-1
    

    jetty 9.3 in /etc/default/jetty

    # JETTY_ARGS
    # The default arguments to pass to jetty.
    # For example
    JETTY_ARGS="jetty.http.port=8080 jetty.ssl.port=443"
    

    or command line parameters -Djetty.http.port=8080 -Djetty.ssl.port=443

提交回复
热议问题