Help i completely broke my Apache2 webserver


#1

My domain is: Sapphirenetwork.eu, mail.sapphirenetwork.eu

I ran this command: ./certbot-auto

It produced this output: it generated the certificates

My web server is (include version): Apache2/2.4.25

The operating system my web server runs on is (include version): Debian 9,7

My hosting provider, if applicable, is: DeinServerHost

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): Cerbot 0.31.0

Hello, so i tried generating ssl certificates to use with my reversed proxy for MailCow, my problem is, that after not being able to redirect my domain (mail.sapphirenetwork.eu) to mailcow, that i removed both my certificates (for my mail.domain and my main domain) and from now on i have weird behavior from my apache2 webserver, so mail.sapphirenetwork.eu redirects me to my main website (and says that it has a valid certificated even though there is not) and my main domain sapphirenetwork.eu shows me an SSL error (ERR_SSL_PROTOCOL_ERROR) i cant fix it, and i need help.

Your sincerely,
Johni


#2

Hi @JohniUYS

there are errors, but it doesn’t look too broken.

First, your main domain ( https://check-your-website.server-daten.de/?q=sapphirenetwork.eu ):

Domainname Http-Status redirect Sec. G
http://sapphirenetwork.eu/
91.200.101.229 301 https://sapphirenetwork.eu/ 0.034 A
http://www.sapphirenetwork.eu/
91.200.101.229 200 0.037 H
https://sapphirenetwork.eu/
91.200.101.229 200 1.540 B
https://www.sapphirenetwork.eu/
91.200.101.229 200 1.284 N
Certificate error: RemoteCertificateNameMismatch

Your non-www is correct, your www has a certificate error. The reason: Your certificate

CN=sapphirenetwork.eu
	09.02.2019
	11.05.2019
expires in 90 days 	autoconfig.sapphirenetwork.eu, 
autodiscover.sapphirenetwork.eu, mail.sapphirenetwork.eu, 
sapphirenetwork.eu - 4 entries

has some domain names, but not the www - version.

So create a new certificate and add the www version.

But more important: Looks you use something like Plesk or another management system. Never use certbot / certbot-auto if you use such a system. These have their own rules, so you shouldn’t mix both.

Your mail-subdomain has Grade C and is completely ok ( https://check-your-website.server-daten.de/?q=mail.sapphirenetwork.eu ): No critical error.

Domainname Http-Status redirect Sec. G
http://mail.sapphirenetwork.eu/
91.200.101.229 301 https://mail.sapphirenetwork.eu/# 0.033 A
https://mail.sapphirenetwork.eu/
91.200.101.229 200 1.344 A
https://mail.sapphirenetwork.eu/# 200 5.237 A

There you use the same certificate.

There is another thing: Your http uses Apache, your https uses nginx.

A Info: Different Server-Headers found

Your main domain uses only Apache. That may be part of the problem you have fixed.