Certbot not generating certificates

Not if you have a stable server. The symptoms really have nothing to do with Let's Encrypt. Just routine requests for your "home" page with HTTP were failing.

3 Likes

now im thinking if there is a way to make the local connections also on https. like those generated from node red etc

Why? Is your local network not secure?

Would a self-signed cert be sufficient if all you want is HTTPS?

3 Likes

Actually
I am controlling my devices at home(iot) using a web page which is hosted on node red
The node red hosts html pages that controls and shows the state of the switches.

That is all fine when i manage it locally in LAN
But, if i want to connect it from internet, my idea was to use nginx and pagekite to expose the server in internet and use the same html files to access the node red configs

But, after everything when i see the page in pagekite url, i see there are some kind of cors issue , like The request client is not a secure context and the resource is in more-private address space

So to avoid all these somebody suggested i should make them all available in https which may solve my problem .. Hope you understand my trouble now.. its like solving one problem creates 3 more problems

Not to be off topic here, but have you considered using a VPN to access your network?

3 Likes

I have thought of this .. So the end result is, the whole page would be seen from a android app made by mit app inventor.. having a vpn means having an cloud computer somewhere which would cost me some amount which im trying to reduce completely

I'm a little puzzled and am getting the 503 Unavailable again so can't look at it.

But, now that you have a cert in nginx you should have a server block for https. And, from your nginx above you have a bunch of location blocks which should now be in that new server block instead. Those look like discrete pages for things like /house, /room2 and so on.

So, when you do https://connekted.pagekite.me/room2.html I'm guessing you should see a page of info for room2. Is that right?

Can you show us your two nginx server blocks (the one for port 80 and port 443)

4 Likes

honestly i have got confused myself too at this moment.

I tried put https to node red . which worked initially. as soon as i did https for nginx things started to take wrong turn and now my basic form is not showing on internet through pagekite

Btw experts .Please tell me one thing.
My initial problem had started with this issue.


Access to fetch at 'http://[ip]:1880/home' from origin 'http://connekted.pagekite.me' has been blocked by CORS policy: The request client is not a secure context and the resource is in more-private address space private.

At that time, my configuration were as follows and none running with ssl

node-red serving the api and html files(web server)
nginx doing the reverse proxy to make it available on port 80
pagekite running against the nginx(computer ip) to show the form on the and viewed against http:// connekted. pagekite. me

To avoid this i was suggested to implement ssl and there is where all this problem started

To fix this i have now, made the nginx running on https and http both.
updated the conf file to include the certificates.
http connekted .pagekite.me/house works well too.

The problem is still with the error on /room1.html

Im lost how to solve this problem?

Use https:// instead of http:// in your HTML.

5 Likes

so UPDATE.

Thanks everyone.
I was able to resolve the issue based upon our last discussions and one small input from Osiris.

The key component that i was missing was not referring the certificates from lets encrypt into the node red.
Thats why both had different certificates.

So what i did to resolve the issue

  1. After generating the certificates based on the response from @MikeMcQ I generated the certificates
    certbot certonly --webroot -w D:\Development\Certbot\acme -d connekted.pagekite.me
  2. Then referred the same inside the node-red settings file:
    key : \privkey.pem
    cert : \cert.pem
  3. Put the server 443 only for the connekted website and confugured accordingly and set the redirect to off.

and everything is now working :man_dancing: :man_dancing:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.