Request starting HTTP/1.1 GET http:// instead of https:// - iis

I'm using IIS to host my webapp. In Bindings, only HTTPS on port 443 defined. But when I check the logs, it still connect to HTTP. Is it correct?
Ex: the scheme is not HTTPS
INFO 2021-05-20 15:57:56,645 [10 ]
soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1
GET
http://10.86.202.211:41/fonts/Poppins/poppins-v5-devanagari_latin-ext_latin-300.woff2

Related

Ngrok - HTTP 400 with virtualhost

I have created a url in ngrok integrated in my webhook of stripe.
But when I call that url, I receive a HTTP 400.
I have a domain name attached to my localhost url: abc.com:port and i have registered that address in my host-file. I executed ngrok like this: ngrok http port which gives me localhost:port.
What might be the issue for it?
See the documentation on how you can "ask ngrok to rewrite the Host header of all tunneled requests to match what your web server expects."
"For example, to route to your local site myapp.dev, you would run:
ngrok http -host-header=myapp.dev 80"

Application working on http but not on https

Background: I have two backend instances running haproxy, apache, nodejs on ports 4000 and 8007 for haproxy, 80 for httpd, 3000 3007 3012 running node. I have a staging site which is running on this instance. I have signed certificate installed at ELB level and ELB listening on https 443 port to backend http 80 port.
Issue: When I tried to login to the stating url with http then the backend is working fine on port 80 and 3000, network flow logs also returning status code as Ok for request to http://stating _url:3000. But when I tried to access site on https then I am getting status as "blocked:mixed-content" for https://stating _url:3000 request. Please refer to below screenshots
Below is output for http which is working as expected
Below is the output for https which is not working as expected
I tried different protocols for listeners at ELB level. I dont understand why ELB on port 80 sends request to port 80 on backend server and all works fine but same ELB on port 443 sends request to same port 80 on backend server but fails to establish connection with 3000.

Why are HTTP curl/Postman requests to a HTTPS server working? (Node, AWS)

I've set up a HTTPS Node server on AWS EC2 which runs on port 4443 and set up Nginx to redirect requests(port 443).
https.createServer(options, app).listen(4443, function(){
console.log("https server started at port 4443");
});
The HTTPS server is working fine, I get a secure connection on browsers and
curl https://mydomain/apiroute works
Now, when I do
curl http://mydomain/apiroute the requests still work. The same goes for Postman.
I know that I can redirect all HTTP traffic to HTTPS using something like 301 redirects but my question is, why does the server respond to HTTP API calls inspite of there being no "HTTP" server?
Additionally, I use a letsencrypt generated certificate.

CloudFlare how to point to 2087 port https?

It is written that now CloudFlare supports 2087 as a port for Https
I have a domain lets say www.somethign.com and it is secure using CloudFlare
I run my node.js on a specific port.
If I choose a port 8080, which is a port allowed for http, and then i call my page like:
http://www.mydomaidnExample.com:8080/webhook
it works perfectly.
but when I set a port for https, such as 2087 and call it like
http://www.mydomadin.com:2087/webhook
i get this error
What should I do please ?
Note that this url
localhost:2087/webhook
is working on the server
Update
Firewall is already off
When using CloudFlare there are restrictions around which ports you connect through for security reasons, the 2087 port is reserved for SSL usage:
For requests made via HTTP:
80
8080
8880
2052
2082
2086
2095
For requests made via HTTPS:
443
2053
2083
2087
2096
8443
Therefore, when using Full SSL mode within CloudFlare and you connect over port 2087 the connection to the origin will be over SSL, if you want to disable this you can use a Page Rule to turn SSL to Flexible on that port.

Not able to access HTTPS link. Getting ssl connection error?

As i have enabled default-ssl site in my ubuntu linux server. When I load the site with Google Chrome I get this error:
SSL connection error
Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.
Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.
With Firefox:
SSL received a record that exceeded the maximum permissible length.
(Error code: ssl_error_rx_record_too_long)
As i have check log file of apache2. Which say suhosin-path mod_ssl
[Fri Apr 04 16:29:33 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch mod_ssl/2.2.22 OpenSSL/1.0.1 mod_perl/2.0.5 Perl/v5.14.2 configured -- resuming normal operations
FYI,
when i run command "apachectl -S" i get this error
/usr/sbin/apachectl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:443 127.0.1.1 (/etc/apache2/sites-enabled/default-ssl:2)
*:80 is a NameVirtualHost
default server 127.0.1.1 (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost 127.0.1.1 (/etc/apache2/sites-enabled/000-default:1)
Syntax OK
if i run "apachectl configtest"
/usr/sbin/apachectl: 87: ulimit: error setting limit (Operation not permitted)
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
Syntax OK
EDIT 1
I am getting below error also
Invalid method in request \x16\x03\x01
Please help me.
It looks like you are setting up an HTTP server on port 443, e.g on a port usually used for HTTPS (HTTP wrapped inside a SSL connection). The Invalid method in request \x16\x03\x01 you get on the server side is the start of the SSL handshake of from the client. And because the client does not get the expected answer back from the server it complains.
I don't know what your intention with this setup is, but
if you want to use only HTTP keep the listener on port 80 and remove the one on port 443
if you want to set up HTTPS you need certificates etc (there is enough documentation out there)
Ok, Here is the solution.
As my domain (example.com) is configured for port forwarding and It was mapping to my Local server
To Access my local server through example.com
It was like this:
http://example.com:1234/project_name
and i was configuring my local server for https
which was accessible as
https://192.168.**.***/project_name
But it was giving error (Invalid method in request \x16\x03\x01) for below url
https://example.com:1234/project_name
Because example.com was not configured for ssl.

Resources