GithubHelp home page GithubHelp logo

softinstigate / nginx-restheart Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 18 KB

Example of NGINX as a SSL frontend for RESTHeart.

restheart ssl ssl-frontend nginx docker docker-compose http https https-proxy

nginx-restheart's Introduction

RESTHeart and NGINX with SSL

This repository shows an example of NGINX as a SSL frontend for RESTHeart.

It uses Docker images to setup a complete stack made with NGINX, RESTHeart and MongoDB.

NGINX acts as a HTTPS reverse proxy for RESTHeart and it uses a self-signed certificate for the SSL connection.

To create the stack:

docker-compose up

To test that it works with curl:

curl --insecure https://localhost/ping

Greetings from RESTHeart!

The --insecure parameter is necessary because we are using a self-signed certificate.

To test that it works with http:

http --verify=no https://localhost/ping
 
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: Location, ETag, Auth-Token, Auth-Token-Valid-Until, Auth-Token-Location, X-Powered-By
Connection: keep-alive
Content-Encoding: gzip
Content-Length: 45
Content-Type: text/plain
Date: Tue, 22 Jun 2021 09:06:02 GMT
Server: nginx/1.21.0
X-Powered-By: restheart.org

Greetings from RESTHeart!

To stop:

docker-compose stop

To clean-up:

docker-compose down

nginx-restheart's People

Contributors

mkjsix avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

nginx-restheart's Issues

Curl errors out in the handshake phase

I have followed the README section (i.e. git clone repo -> docker-compose up -> curl --insecure https://localhost/ping) in order to set up the complete NGINX, RESTHeart and MongoDB stack.
I can access the RESTHeart server via http://localhost:8080/ping in an unsecured way.
However, as soon as I use curl --insecure https://localhost/ping, curl errors out both in Windows 10 Enterprise and a Ubuntu 20.04.2 LTS VM.

Windows 10 Enterprise

curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed

Ubuntu 20.04.2 LTS VM

curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:443

Unfortunately, neither nginx or restheart recognize the https call (i.e. do not log an exception in both normal and debug logging mode).
In case you know of a way to solve this problem, please attach a response to this issue report.

Regards,
Bram

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.