Eu removi o example.com:80 e substituí-lo por *: 80.
Atualmente, estou tentando fazer com que meu servidor apache 2 funcione. Eu posso me conectar com sucesso via https. Mas o http dá um erro 404.
vhost http
<VirtualHost example.com:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin [email protected]
DocumentRoot /var/www/example.com/html
#<Directory /var/www/example.com/html>
# Options Indexes FollowSymLinks MultiViews
# AllowOverride None
# Order allow,deny
# allow from all
#</Directory>
<ifmodule mod_rewrite.c="">
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}$1 [R=301,L]
</ifmodule>
#SSL Redirect
Redirect permanent / https://example.com/
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
</VirtualHost>
E meu https vhost
<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com
ServerAdmin [email protected]
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
# Pfad zu den Webinhalten
DocumentRoot /var/www/example.com/html
</VirtualHost>
Obrigado por dar uma olhada.
Eu removi o example.com:80 e substituí-lo por *: 80.