Problem bei der https Konfiguration

Alles, was den Apache betrifft, kann hier besprochen werden.

Problem bei der https Konfiguration

Postby uweh » 28. August 2011 17:41

Guten Tag

Ich habe ein Problem. Wenn ich das Moodle Login auf https umstellen will kann die Login Seite nicht mehr geladen werden. Der Browser meldet dann "Die Seite kann nicht gefunden werden".

Ich habe ein eigenes Zertifikat auf dem Server erstellt und installiert. Der Apache meldet mir auch keinen Fehler dabei.
Dabei habe ich mich an diese Anleitung gehalten: http://docs.moodle.org/19/de/Apache#SSL

In den Logfiles finde ich auch keinen Hinweis auf einen Fehler oder abgelehnte Verbindungen.

Habe ich etwas vergessen?

Danke für die Hilfe

Hier gleich noch ein paar Infos. Ich hoffe die reichen aus ...


uname -a:
Linux awo-ww-elearning 2.6.35-28-generic-pae #50-Ubuntu SMP Fri Mar 18 20:43:15 UTC 2011 i686 GNU/Linux

sites-enabled:
lrwxrwxrwx 1 root root 26 2010-10-13 16:53 000-default -> ../sites-available/default
lrwxrwxrwx 1 root root 40 2011-07-16 12:22 000-default-ssl -> /etc/apache2/sites-available/default-ssl
lrwxrwxrwx 1 root root 30 2011-07-16 11:23 default-ssl -> ../sites-available/default-ssl
lrwxrwxrwx 1 root root 46 2010-10-19 11:34 moodlevirtualhost -> /etc/apache2/sites-available/moodlevirtualhost


sites-available:
-rw-r--r-- 1 root root 959 2010-10-13 17:06 default
-rw-r--r-- 1 root root 7680 2011-08-07 21:48 default-ssl
-rw-r--r-- 1 root root 520 2011-08-07 21:47 moodlevirtualhost



default:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/moodle/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>

</VirtualHost>


default-ssl:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
ServerName awoww.dyndns.org
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined

Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
SSL
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>

BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

</VirtualHost>
</IfModule>

moodlevirtualhost
<VirtualHost *:80>
ServerAdmin webmaster@awo-westerwald.de
DocumentRoot /var/www/moodle/
ServerName awoww.dyndns.org
ServerAlias http://www.awoww.dyndns.org awo-ww-elearning.dyndns.org
</VirtualHost>

<VirtualHost *:443>
Serveradmin webmaster@awo-westerwald.de
DocumentRoot /var/www/moodle/
ServerName awoww.dyndns.org
ServerAlias http://www.awoww.dyndns.org awo-ww-elearning.dyndns.org
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
</VirtualHost>
uweh
 
Posts: 2
Joined: 28. August 2011 17:37

Re: Problem bei der https Konfiguration

Postby WilliL » 28. August 2011 17:58

es stand nirgendwo, hast du
NameVirtualHost *:80
NameVirtualHost *:443
drin?
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: Problem bei der https Konfiguration

Postby uweh » 28. August 2011 19:04

Das habe ich in der ports.conf
Muss das sonst noch wo stehen?
Sorry, aber ist mein erster Versuch :)


NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
ServerName awoww.dyndns.org
NameVirtualHost *:443
Listen 443
</IfModule>

<IfModule mod_gnutls.c>
ServerName awoww.dyndns.org
NameVirtualHost *:443
Listen 443
</IfModule>
uweh
 
Posts: 2
Joined: 28. August 2011 17:37

Re: Problem bei der https Konfiguration

Postby glitzi85 » 15. September 2011 18:49

In der ports.conf ist das schon ganz OK. Aber bitte nimm die ServerName-Anweisungen aus der ports.conf wieder raus. Die gehören da logisch einfach nicht rein. Pack das hier in die Datei /etc/apache2/httpd.conf:
Code: Select all
ServerName awoww.dyndns.org
ServerAdmin webmaster@awo-westerwald.de

Dann kannst du dir zumindest die Angabe des ServerAdmin in den VirtualHost-Blöcken sparen.

Dann führ bitte noch diesen Befehl aus:

Code: Select all
rm /etc/apache/sites-enabled/000-default /etc/apache/sites-enabled/000-default-ssl /etc/apache/sites-enabled/default-ssl


Deine moodlevirtualhost kommt niemals zum tragen wenn du diese Links drin hast, da du in allen vHosts den gleichen ServerName eingetragen hast. Das kann bei NameBased Virtual Hosting nicht funktionieren!

mfg glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim


Return to Apache

Who is online

Users browsing this forum: No registered users and 12 guests