-
Notifications
You must be signed in to change notification settings - Fork 79
Quick Start Guide
- Visit the Styx release page and download the release for your OS, i.e. one of:
styx-<LATEST_VERSION>-linux.zip
styx-<LATEST_VERSION>-macosx.zip
-
Unzip into a location of your choosing, which we will call
<YOUR_INSTALL_DIR>
. -
run
<YOUR_INSTALL_DIR>/bin/startup
-
look for a log message similar to:
INFO 2017-10-18 15:42:10 [c.h.s.StyxServer] [build=release.label_IS_UNDEFINED] [main] - Started styx server in 65ms
if you see this message, Styx has started up!
-
You can check the admin interface by visiting localhost:9000
-
Once you are happy with this, you may want to try proxying, for which you need an origins configuration file.
-
Shut down Styx (you can use Ctrl+C from the terminal).
-
Create an origins file (see origins-configuration-documentation.yml for an example) at a location of your choosing, which we will call <PATH_TO_ORIGINS_FILE>
-
Modify your Styx config file by adding the following line:
originsFile: <PATH_TO_ORIGINS_FILE>
-
run
<YOUR_INSTALL_DIR>/bin/startup
-
You should now be able to use the proxy by visiting localhost:8080
Note: the default Styx config file is located at <YOUR_INSTALL_DIR>/conf/default.yml
IntelliJ Idea editor fails to compile test classes in styx-NNN
module.
Ensure the module is marked as test-sources
in your editor.
- In the Project window, highlight the module test sources directory. For example
styx/components/proxy/src/test/kotlin
. - Right click to bring up the context menu. Choose Mark Directory as / Test Sources Root.
- This should fix the problem. You may have to do a maven refresh for the changes to take effect.
Styx fail to start with the message:
Failed to load any of the given libraries: [netty_tcnative_osx_x86_64, netty_tcnative]
This may be caused by your system not supporting OPENSSL
.
See the following section in <YOUR_INSTALL_DIR>/conf/default.yml
:
proxy:
connectors:
http:
port: 8080
https:
port: 8443
sslProvider: OPENSSL # Also supports JDK
certificateFile: ${STYX_HOME:classpath:}/conf/tls/testCredentials.crt
certificateKeyFile: ${STYX_HOME:classpath:}/conf/tls/testCredentials.key
sessionTimeoutMillis: 300000
sessionCacheSize: 20000
This can be solved in one of various ways.
-
Make sure that you are using the correct Styx release for your platform: macosx or linux
-
If you do not want SSL support, you can remove the
https
connector from<YOUR_INSTALL_DIR>/conf/default.yml
. -
If you do want SSL support, modify the file
<YOUR_INSTALL_DIR>/conf/default.yml
so that the sslProvider is set toJDK
. Yourdefault.yml
will then look like this:proxy: connectors: http: port: 8080 https: port: 8443 sslProvider: JDK certificateFile: ${STYX_HOME:classpath:}/conf/tls/testCredentials.crt certificateKeyFile: ${STYX_HOME:classpath:}/conf/tls/testCredentials.key sessionTimeoutMillis: 300000 sessionCacheSize: 20000
-
You can also supply a different configuration file by setting the environment variable
STYX_CONFIG
to the location of a different file.