Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edadma/geyser
Configurable HTTP server based on Spray
https://github.com/edadma/geyser
Last synced: 4 days ago
JSON representation
Configurable HTTP server based on Spray
- Host: GitHub
- URL: https://github.com/edadma/geyser
- Owner: edadma
- License: mit
- Created: 2014-12-23T22:58:51.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-16T17:46:16.000Z (almost 10 years ago)
- Last Synced: 2024-11-19T10:12:52.162Z (2 months ago)
- Language: Scala
- Size: 234 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Geyser
======Geyser is an easy to configure HTTP server based on the [Spray Framework](http://spray.io). It can load a Spray route (web application) into the same JVM as Geyser and forward requests to it internally as opposed to doing port forwarding through a reverse proxy.
Configuration
-------------A minimal configuration would be
http
interface example.com
port 8080directory /var/www/example.com/html
which would start a server listening on port 8080 serving web pages in directory `/var/www/example.com/html` for domain `example.com`.
Here is a more involved example
http
interface example.com
port 80
timeout 5
host example.com
prefix "maven2"
directory /var/www/example.com/maven2
directory /var/www/example.com/htmlstatus 404
file /var/www/example.com/404.html
host example.org
application /var/www/example.org/app.jar org.example.ServiceIn the above example, there is a Maven repository (`http://example.com/maven2/...`) and a website at `http://example.com`. If a non-existant resource under domain `example.com` was requested, the server will respond with `/var/www/example.com/404.html` and with status code 404. However, if a request was made under a different domain (i.e. the IP address was used), then a more generic 404 response will be sent. Also, there is a Spray application (JAR) at `http://example.org`.
By default, configuration is in `/etc/geyser/config`, but can be overridden with the `-c` command line option.
The executable can be downloaded from [https://bintray.com/artifact/download/edadma/generic/geyser-0.2.jar].