I am using zphisher. when i create a link to ngrok, the link is generated, but on opening it it says ngrok gateway error The server returned an invalid or incomplete HTTP response.
I got to know from ngrok error documentation that it is error 3004. they tell the error code and message but no possible way to fix the error. can someone help me please. I think my brother watches YouTube during his online classes and I want to conform it. No phishing. Please. I got absolutely no help from anywhere. Just one of my friend told me that i need an ngrok account for that. tried it, doesn't work.
After some time I got it fixed doing 2 things:
- Make sure my local site is http (not https)
- Running command
ngrok http -host-header=rewrite localhost:PORT
If your site using https://localhost:port below really works for me
ngrok http https://localhost:port --host-header=rewrite
and if you're working using the yml file:
authtoken: YOUR_AUTH_TOKEN
tunnels:
frontend:
proto: http
addr: https://127.0.0.1:3002
host_header: rewrite
--host-header=rewrite
was the solution. –
Mudcat For me, this command worked when I was receiving the 3004 error message and trying to access HTTPS on https://localhost:3000
:
./ngrok http https://localhost:3000
ngrok http https://localhost:5001 -host-header="localhost:5001"
(as opposed to microsoft docs which suggests only ngrok http -host-header=localhost 5001
was needed) –
Reduplicate -host-header rewrite
for this as well. –
Junji I found an answer in this link and it solved my problem.
According to this you can use this command instead:
ngrok http https://localhost:[port]
error message: "loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://11111.ngrok-free.app/'. This request has been blocked; the content must be served over HTTPS."
I had the same problem with ngrok, my site was in https but all the inner requests were changed to http so for it to work I have changed the code in EasyAdmin Bundle , the file in in /vendor/easycorp/easyadmin-bundle/src/router/AdminUrlGenerator.php in line 267 after "$this->isInitialized = false;" we have to add the line $url = str_replace("http","https",$url);
and now it works for me.
The solution is pretty straightforward. Use the localhost:port where your application is running. For example, my Jenkins app is running on
http://localhost:8080
I will run the command $ngrok http http://localhost:8080
Notice the http/https difference
my solution is using this command:
ngrok http "http://$(ip route get 1.2.3.4 | awk '{print $7}')"
your httpd.conf must listen to port 80 or you must add it in the command. my OS is arch linux.
© 2022 - 2025 — McMap. All rights reserved.
ngrok http https://localhost:8433
– Junji