Zum Inhalt springen

anazhir

Mitglieder
  • Gesamte Inhalte

    5
  • Benutzer seit

  • Letzter Besuch

  1. also ich habe die vhosts nun kombiniert, alles funktioniert einwandfrei. Was ich vergessen hatte: sites deaktivieren / aktivieren: https://www.systutorials.com/docs/linux/man/8-a2ensite/ alte configs deaktivieren mit: a2dissite domaina.conf ... neue configs aktivieren mit: a2ensite domainb.conf das Zertifikat funktioniert dann , als ich die korrekte URL in Wordpress eingestellt hatte. Vielen Dank noch einmal!
  2. also das Ganze ging jetzt ziemlich in die Hose :D. Ich habe alle vhosts umbenannt, als auch die dateien zusammengeführt und dann war keine einzige Seite mehr erreichbar Ich werde es die Tage noch einmal versuchen und berichten. MfG
  3. Hallo, vielen Dank für die Antwort! Ich werde es gleich einmal anpassen. MfG
  4. Guten Tag alle beisammen, ich benötige Hilfe bei der Einrichtung von Zertifikaten auf meiner Website. Ich habe für 2 Domains (beide zeigen auf den gleichen Webserver) ein Zertifikat mit certbot erstellt und folgende Probleme mit den Zertifikaten: Problem mit Domain A: Hier habe ich zwei Ordner für die gleiche Domain in dem Ordner /etc/letsencrypt/live, einmal /domaina.de und einmal /domaina.de-0001. Ich konnte herausfinden, dass die aktiven Zertifikatsdateien im Ordner /domaina.de-0001 genutzt werden. Wenn ich jedoch den ordner /domaina.de löschen möchte lässt sich der apache Server nicht neustarten (das Gleiche gilt für den Ordner "/domaina.de-0001"). je nachdem welchen Browser ich verwende ist das Zertifikat gültig, oder nicht. Gültig mit: Chrome und Firefox, nicht gültig mit Edge Chromium. Was mache ich falsch? Hier die vHost Files von domaina.de: 000-default.conf: <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf Redirect / https:// RewriteEngine on RewriteCond %{SERVER_NAME} =schulzbox.de RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost> <VirtualHost *:443> ServerName schulzbox.de <IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains" </IfModule> </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 000-default-le-ssl.conf: <IfModule mod_ssl.c> <VirtualHost *:443> ServerAdmin admin@example.com DocumentRoot /var/www/html/wordpress/ ServerName schulzbox.de Alias /wordpress "/var/www/html/wordpress/" <IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=15552000; includeS$ </IfModule> <Directory /var/www/html/wordpress/> Options +FollowSymlinks AllowOverride All Require all granted <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/html/wordpress SetEnv HTTP_HOME /var/www/html/wordpress </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # Redirect / https:// RewriteEngine on # Some rewrite rules in this file were disabled on your HTTPS site, # because they have the potential to create redirection loops. # RewriteCond %{SERVER_NAME} =schulzbox.de # RewriteRule ^ https://schulzbox.de/wordpress [END,NE,R=permanent] Include /etc/letsencrypt/options-ssl-apache.conf #SSLCertificateFile /etc/letsencrypt/live/schulzbox.de/fullchain.pem #SSLCertificateKeyFile /etc/letsencrypt/live/schulzbox.de/privkey.pem SSLCertificateFile /etc/letsencrypt/live/schulzbox.de-0001/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/schulzbox.de-0001/privkey.pem </VirtualHost> </IfModule> Vlt kann mir hier ja jmd weiterhelfen, ich bin wirklich ratlos... Problem mit Domain B: Hier habe ich mit dem Befehl certbot -d www.domainb.de ein Zertifikat für diese Domain erstellt. Hierbei wurde nur ein Ordner in /live erstellt. Bei dem Installationsprozess kommt jedoch folgende Fehlermeldung: No vhost exists with servername or alias of www.soulrip.de. No vhost was selected. Please specify ServerName or ServerAlias in the Apache config. vor dieser Fehlermeldung sollte ich eine vhost Datei auswählen, da keine vhost-Datei mit der Domain www.domainb.de gefunden werden konnte (obwohl für http und https im ordner sites-available vhosts vorhanden waren) und ich solle eine Datei auswählen, auch hier tauchten die 2 vhost Dateien nicht auf. Randanmerkung: ich habe den ServerName in beiden Dateien hinterlegt. Auch funktioniert die https Weiterleitung nicht. Wenn ich die Seite mit https://www.domainb.de aufrufe ist das Zertifikat nicht gültig. Auch hier Randanmerkungen. Ich habe mit der hauptdomain domain.de (ohne www) das Limit an Generierungen erreicht, weil ich aufgrund des fehlerhaften Zertifikats zu oft getestet habe. Hier die vhosts für (www.)domainb.de: domainb.conf <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerAdmin webmaster@localhost DocumentRoot /var/www/html # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf Redirect / https://www.soulrip.de RewriteEngine on RewriteCond %{SERVER_NAME} =www.soulrip.de RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost> <VirtualHost *:443> ServerName www.soulrip.de <IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains" </IfModule> </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet domainb-le-ssl.conf: <IfModule mod_ssl.c> <VirtualHost *:443> ServerAdmin info@soulrip.de DocumentRoot /var/www/html/wordpress/ ServerName www.soulrip.de Alias /wordpress "/var/www/html/wordpress/" <IfModule mod_headers.c> Header always set Strict-Transport-Security "max-age=15552000; includeS$ </IfModule> <Directory /var/www/html/wordpress/> Options +FollowSymlinks AllowOverride All Require all granted <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/html/wordpress SetEnv HTTP_HOME /var/www/html/wordpress </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined # Redirect / https:// RewriteEngine on # Some rewrite rules in this file were disabled on your HTTPS site, # because they have the potential to create redirection loops. # RewriteCond %{SERVER_NAME} =www.soulrip.de # RewriteRule ^ https://www.soulrip.de/wordpress [END,NE,R=permanent] Include /etc/letsencrypt/options-ssl-apache.conf #SSLCertificateFile /etc/letsencrypt/live/schulzbox.de/fullchain.pem #SSLCertificateKeyFile /etc/letsencrypt/live/schulzbox.de/privkey.pem SSLCertificateFile /etc/letsencrypt/live/www.soulrip.de/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/www.soulrip.de/privkey.pem </VirtualHost> </IfModule> Ich bedanke mich jetzt schon einmal für jeden, der sich Zeit genommen hat! Ich würde mich über Input freuen, gerne gebe ich auch weitere logs auf Anfrage durch, ich weiß nur nicht welche hier noch sinnvoll sind, deswegen warte ich damit erst einmal noch. Gefühlt besitze ich in diesem Bereich noch zu wenig Fachwissen. Google war mir leider auch keine Hilfe. apachectl -t -D DUMP_VHOSTS AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message VirtualHost configuration: *:80 is a NameVirtualHost default server 127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1) port 80 namevhost 127.0.1.1 (/etc/apache2/sites-enabled/000-default.conf:1) port 80 namevhost nextcloud.schulzbox.de (/etc/apache2/sites-enabled/nextcloud.conf:1) port 80 namevhost 127.0.1.1 (/etc/apache2/sites-enabled/soulrip.conf:1) *:443 is a NameVirtualHost default server schulzbox.de (/etc/apache2/sites-enabled/000-default-le-ssl.conf:2) port 443 namevhost schulzbox.de (/etc/apache2/sites-enabled/000-default-le-ssl.conf:2) port 443 namevhost schulzbox.de (/etc/apache2/sites-enabled/000-default.conf:34) port 443 namevhost nextcloud.schulzbox.de (/etc/apache2/sites-enabled/nextcloud-le-ssl.conf:2) port 443 namevhost www.soulrip.de (/etc/apache2/sites-enabled/soulrip-le-ssl.conf:2) port 443 namevhost www.soulrip.de (/etc/apache2/sites-enabled/soulrip.conf:34) Hier ist noch eine domainc zu sehen, bei dieser funktioniert jedoch alle problemlos.

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...