Hi. Welcome!
1. The problem I’m having:
I want to enable HTTPS on my server without using domain. I have a VM on Google Compute Engine. It has public IP. I’ve tried to generate self-signed certificate for IP using tutorial (link below). HTTP works just fine. I’ve checked all firewall stuff. 443 is enabled.
I’m hosting Telegram bot on that server. I don’t care about domain name and want to stick to the free options. I’m newbie on all that servers thing. Please help.
2. Error messages and/or full log output:
Safari can’t open the page “https://35.184.31.227” because Safari can’t establish a secure connection to the server “35.184.31.227”.
3. Caddy version:
latest
4. How I installed and ran Caddy:
with apt install
a. System environment:
Ubuntu 18 on Google Compute Engine.
d. My complete Caddy config:
35.184.31.227 {
tls /home/user/ssl/cert.pem /home/user/ssl/key.pem
# Set this path to your site's directory.
root * /usr/share/caddy
# Enable the static file server.
file_server
# Another common task is to set up a reverse proxy:
reverse_proxy localhost:8080
# Or serve a PHP site through php-fpm:
# php_fastcgi localhost:9000
}```
### 5. Links to relevant resources:
https://medium.com/@antelle/how-to-generate-a-self-signed-ssl-certificate-for-an-ip-address-f0dd8dddf754