Ngrok not sending to https


  • | 47 points

    Forwarding http://acfad615.ngrok.io -> http://xxxx.test:80
    Forwarding https://acfad615.ngrok.io -> http://xxxx.test:80

    How can I change that https is sending to https on port 443 ?


  • | 1324 points

    @up

    Same question/problem :/


  • | 177 points

    Another vouch


  • | 292 points

    Face the same problem.

    NOT the solutions, but some findings about this:-

    In this scenario, i'm running Windows with local hostname carsaloon.test.

    **Final thought, the "Share" option in the Laragon application is fixed unless the Laragon developer change the command inside .exe file.

    Hope this helped, and thanks to leokhoa.


  • | 343 points

    Yep, the same here. Please do something about that, because it is so annoying!


  • | 12 points

    Faced the same issue, had to go the @popkilli way.


  • | 5 points

    face the same problem


  • | 311 points

    After some period of time, now ngrok version 3 did support HTTPS forwarding, by not using click and select on "Share" provided in Laragon. Just use command to execute the tunneling: -

    1. Download latest ngrok (version 3)

    2. Upgrade or generate the ngrok config file (C:\Users<username>.ngrok2\ngrok.yml) by running "ngrok config upgrade" (for upgrade), else leave the file empty (for generate)

    3. Inslde ngrok.yml: -

    authtoken: <YOUR_TOKEN>
    tunnels:
    laragon:
    addr: mytest0.test:80
    proto: http
    host_header: rewrite
    test1:
    addr: mytest1.test:80
    proto: http
    host_header: rewrite
    test2:
    addr: mytest2.test:80
    proto: http
    host_header: rewrite
    version: "2"
    region: us

    • replace addr with your own virtual host name and port
    • you can recreate multiple tunnels, in this example the tunnel name is laragon, test1 & test2
    1. After save the config, simply run "ngrok start <TUNNEL_NAME>" to start, e.g. ngrok start laragon

  • | 343 points

    @sjkhew Hi!
    I've tried to start a tunnel as you proposed, unfortunately it shows me errors:

    ERROR: Error reading configuration file 'C:\Users\artte.ngrok2\ngrok.yml': YAML parsing error: yaml: unmarshal errors:
    ERROR: line 2: field TestLaragon not found in type config.v2yamlConfig
    ERROR: line 3: field addr not found in type config.v2yamlConfig
    ERROR: line 4: field proto not found in type config.v2yamlConfig
    ERROR: line 5: field host_header not found in type config.v2yamlConfig

    What am I doing wrong? Thank you


  • | 292 points

    @isdigital-github

    kindly use v3 ngrok


  • | 343 points

    @popkilli @sjkhew

    Alright, finally I've managed to start tunnels with ngrok v3, but nevertheless I was able just to make an http tunnel following your method.

    How do I make it https?


  • | 539 points

    Work for me with ngrok v3.

    • in laragon terminal run ngrok start project (start tunnel)
    • or equivalent ngrok http https://project.test --host-header rewrite

    Example configuration:

    # C:\Users\<username>\AppData\Local\ngrok\ngrok.yml
    version: "2"
    authtoken: __ToKeN__
    tunnels:
      # Forwarding -> https://project.test:443
      project:
        addr: https://project.test  # project address w/out port number
        proto: http
        host_header: rewrite        # add this to not redirect to "https://localhost"
    
    # D:\Laragon\etc\apache2\sites-enabled\auto.project.test.conf
    # If you want to use SSL, enable it by going to Menu > Apache > SSL > Enabled
    define ROOT "D:/Laragon/www/project"
    define SITE "project.test"
    
    <VirtualHost *:80>
        RewriteEngine On
        RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
        DocumentRoot "${ROOT}"
        ServerName ${SITE}
        ServerAlias *.${SITE}
        <Directory "${ROOT}">
            AllowOverride All
            Require all granted
        </Directory>
    </VirtualHost>
    
    <VirtualHost *:443>
        DocumentRoot "${ROOT}"
        ServerName ${SITE}
        ServerAlias *.${SITE}
        <Directory "${ROOT}">
            AllowOverride All
            Require all granted
        </Directory>
    
        SSLEngine on
        SSLCertificateFile      D:/Laragon/etc/ssl/laragon.crt
        SSLCertificateKeyFile   D:/Laragon/etc/ssl/laragon.key
    </VirtualHost>
    

  • | 343 points

    @adorade

    I'm using nginx. Do you have a solution for nginx?

    Variants with config files just don't work and redirect me to http anyway.

    When I try using ngrok http https://project.test --host-header rewrite, it forwards me to port 443 instead of 8443, which results in 502 error.

    The better result is when I try to use ngrok http https://project.test:8443 --host-header rewrite. It loads a page then on my mobile device, but the styles are missing.

    Do you have any ideas?


  • | 539 points

    @isdigital-github
    I have no solution at the moment. I will try something tomorrow. Maybe the <path to the stylesheet> that start with / is the cause .(<link rel="stylesheet" href="/css/style.css">)


  • | 343 points

    @adorade

    I'm using Wordpress. It generates absolute stylesheet paths, i.e. with domain and port number.


  • | 539 points

    @isdigital-github
    I can confirm that it is a WordPress issue (absolute path).
    For more information:

    I used a plugin and it worked (apache server).


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.