javahttpsopentripplanner

Open Trip Planner over HTTPS


I'm trying to deploy a solution using Open Trip Planner, and everything is OK if I use HTTP, but apparently the HTTPS connection doesn't work. I've followed the official docs but with no success, apparently the internal server is running, it logs that the expected HTTPS port is listening and the port is actually shown as listening by the OS (Windows 10 Pro) but no secure connection can be established (I tried the "curl" and "open-ssl" tests in the page but both failed) This is the document I refer to: http://docs.opentripplanner.org/en/latest/Security/#security

Please any help is appreciated, thanks in advance

enter image description here enter image description here enter image description here


Solution

  • Is using a reverse proxy like nginx an option for you? That way nginx can handle the HTTPS requests, and then pass them onto opentripplanner.

    Here's an example nginx configuration:

    server {
        listen 443;
        ssl on;
        ssl_certificate /etc/ssl/cacert.pem;
        ssl_certificate_key /etc/ssl/privkey.pem;
        server_name opentripplanner.example.com;
    
        proxy_pass         http://127.0.0.1:8000;
    }
    

    References: