Score:0

apache2 suddenly failing to serve https

ye flag

apache2 v.2.41 on Ubuntu 20.04.5 LTS (WSL2) is suddenly not connecting over https, in browser or via wget.

It's been working for months, and I haven't changed anything.

I tried restarting Apache; it's still not working.

My sites's .conf file:

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerAdmin <redacted>
    ServerName penguin.linux.test
    ServerAlias www.penguin.linux.test
    DocumentRoot /home/<redacted>/www
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

SSLEngine on
SSLCertificateFile /etc/ssl/certs/apache-selfsigned.crt
SSLCertificateKeyFile /etc/ssl/private/apache-selfsigned.key
</VirtualHost>
</IfModule>

I followed these instructions to create a self-signed cert, several months ago. I just ran this again:

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt

No errors in error.log. But access.log shows some access when I use the browser:

::1 - - [30/Jan/2023:08:34:02 -0600] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f (internal dummy connection)"
::1 - - [30/Jan/2023:08:34:05 -0600] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f (internal dummy connection)"
::1 - - [30/Jan/2023:08:34:06 -0600] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.41 (Ubuntu) OpenSSL/1.1.1f (internal dummy connection)"
172.27.224.1 - - [30/Jan/2023:08:36:24 -0600] "GET /src/ HTTP/1.1" 200 29952 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"

telnet [local IP] 443 is able to connect, which is weird.

The browser doesn't seem to ever timeout. Chrome Dev Tools shows no network requests.

diya avatar
la flag
`telnet [local IP] 443` shows that you can establish a TCP connection (in other words there is something listening on port 443) - it does not validate if that something properly supports either TLS/SSL and/or HTTPS. - use for instance `openssl s_client -connect [IP]:443` and/or `curl -kv https://local-ip/` to verify that
mgiuffrida avatar
ye flag
Thanks. For whatever reason, it started working again. Weird.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.