vServer und SSL-Page-Fehler

Apache, Lighttpd, nginx, Cherokee
Post Reply
hemzet
Posts: 11
Joined: 2004-12-01 11:35
 

vServer und SSL-Page-Fehler

Post by hemzet »

Hallo,

habe auf einem vServer Apache2 so konfiguriert, dass er auf Port 443 hoert. Ausserdem einen vHost auf dem SSL-Port mit einem existierenden Verzeichnis angelegt sowie die Zertifikate erstellt.

Nun bekomme ich beim Aufruf einer https-Seite immer die Fehlermeldung "Seite kann nicht angezeigt werden" mit dem Untertitel "Kann Server oder DNS nicht finden". Die gleiche Seite über Port 80 funktioniert (beide Seiten existieren als vHost-Einträge) .

Woran kann dieses Phänomen liegen, bzw wonach müßte ich schauen. Hat evtl Confixx3 seine Hände durch irgendwelche .conf's im Spiel? Verwalte die vHosts händisch, nicht mit Confixx.

Vielen Dank und Gruss
Oliver
wgot
Posts: 1675
Joined: 2003-07-06 02:03
 

Re: vServer und SSL-Page-Fehler

Post by wgot »

Hallo,

Confixx3 legt selbst einen SSL-Vhost an in der confixx_mhost.conf. Komisch nur: wenn der stört würde ich den Confixx-Login erwarten.

Zeig mal deine Konfiguration, der SSL-Teil genügt (erstmal).

Gruß, Wolfgang
jhnet
Posts: 98
Joined: 2004-07-20 11:43
 

Re: vServer und SSL-Page-Fehler

Post by jhnet »

Hi,

und Du hast auch wirklich das
Listen <IP>:443
eingetragen?

Neben der Konfiguration wäre auch interessant was im Logfile steht, wird z.B. das SSL-Modul überhaupt ordentlich geladen?

Bye,
Jörg
hemzet
Posts: 11
Joined: 2004-12-01 11:35
 

Re: vServer und SSL-Page-Fehler

Post by hemzet »

Hallo,

wegen der genauen Config müßte ich heute Abend nochmal nachschauen. Komme leider von der Arbeit aus nicht drauf...

Habe aber gestern noch ein wenig an der Config gefeilt und mir ist folgendes aufgefallen, vielleicht hilft es euch ja!?

- der Zugriff auf https://adresse oder adresse:443 bringt die angegebene Fehlermeldung
- aber der Zugriff auf http://adresse:443 funktioniert, allerdings unverschlüsselt!
z.B. das SSL-Modul überhaupt ordentlich geladen?
Wie kann ich das denn testen? Der Apache hört definitiv auch auf den Port 443. Ein "netstat -l" zeigt dies.

Danke und Gruss
jhnet
Posts: 98
Joined: 2004-07-20 11:43
 

Re: vServer und SSL-Page-Fehler

Post by jhnet »

Dann stimmt scheinbar wirklich was mit Deiner Konfiguration nicht und Du wirst nicht umhin kommen die entsprechenden Ausschnitte entweder hier zu posten oder zumindest per PM zu schicken.

Ob das SSL-Modul geladen ist lässt sich z.B. im Output von phpinfo() sehen.

Bye,
Jörg
cybermage
Posts: 158
Joined: 2002-12-10 22:10
Location: Ausgburg (Germany)
Contact:
 

Re: vServer und SSL-Page-Fehler

Post by cybermage »

anfangen würd ich mit den berechtigungen der index.php und vom fcgi-starter
hemzet
Posts: 11
Joined: 2004-12-01 11:35
 

Re: Berechtigungen

Post by hemzet »

anfangen würd ich mit den berechtigungen der index.php und vom fcgi-starter
die berechtigungen stimmen, sonst wuerde ueber port 80 ja kein ergebnis erscheinen!?

gruss
hemzet
Posts: 11
Joined: 2004-12-01 11:35
 

Inhalt der config-files

Post by hemzet »

Hallo,

anbei nun der Inhalt der Dateien zur Konfiguration von SSL... Verwendet wird ein Confixx3.0.5Pro.


/etc/apache2/confixx_mhost.conf
Diese Inhalte stehen, damit bei Eingabe einer ungültigen Sub-Domain eine Standardseite angegeben wird.
myserv:/etc/apache2 # vi confixx_mhost.conf
# a backup of the file.
#
# If you need to modify this file, you can insert some custom "Include"
# directives. E.g.
# Include /path/to/your/file
# Includes inserted directly after <VirtualHost> tag would keep their
# location inchanged after the file is updated. Other includes would
# be moved to be inserted before the </VirtualHost> tag.
##########################################################################

php_admin_value open_base_dir /srv/www/htdocs
php_admin_value include_path .


NameVirtualHost <ip-address>:80
<VirtualHost <ip-address>:80>
DocumentRoot /srv/www/confixx/html/gesperrt
php_admin_value open_basedir /srv/www/confixx/html/gesperrt
php_admin_value file_uploads 0
</VirtualHost>

NameVirtualHost <ip-address>:443
<VirtualHost <ip-address>:443>
DocumentRoot /srv/www/confixx/html/gesperrt

<IfModule mod_ssl.c>

SSLEngine on
SSLCertificateKeyFile /etc/apache2/ssl.key/<myserv>.key
SSLCertificateFile /etc/apache2/ssl.crt/<myserv>.crt


SetEnvIf User-Agent ".*MSIE.*"
nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0

<Files ~ ".(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>

<Directory "/srv/www/confixx/html/cgi-bin">
SSLOptions +StdEnvVars
</Directory>

</IfModule>
</VirtualHost>

Include /etc/apache2/confixx_vhost.conf
# ^- It is imperative that this entry remain at the end of the file
## /CONFIXX
/etc/apache2/confixx_vhost.conf
Hierin stehen alle zu verwendeten Subdomains...
#NameVirtualHost <ip-address>:80
UseCanonicalName Off
php_admin_flag safe_mode On
php_admin_value safe_mode_exec_dir /srv/www/empty/
LogFormat "%V:#:%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"" confixx
LogFormat "%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i"" confixx2
CustomLog /var/log/apache2/confixx/stdlog_access confixx2

<Directory "/srv/www">
<Files ~ "^.ht">
deny from all
</Files>
AllowOverride None
AllowOverride Indexes AuthConfig Limit FileInfo
Options None
Options +FollowSymLinks +Includes
</Directory>

<Directory "/srv/www/web1/html">
Options -FollowSymLinks -SymLinksIfOwnerMatch
DirectoryIndex index.html index.htm index.php index.php3 index.php4 index.wml
<IfModule mod_access.c>
Allow from all
</IfModule>
<Files ~ ".shtml$">
deny from all
</Files>
<Files ~ ".inc$">
order allow,deny<Directory "/srv/www/web2/html">
Options -FollowSymLinks -SymLinksIfOwnerMatch
DirectoryIndex index.html index.htm index.php index.php3 index.php4 index.wml
<IfModule mod_access.c>
Allow from all
</IfModule>
<Files ~ ".shtml$">
deny from all
</Files>
<Files ~ ".inc$">
order allow,deny
deny from all
</Files>
</Directory>

<Directory "/srv/www/web3/html">
Options -FollowSymLinks -SymLinksIfOwnerMatch
DirectoryIndex index.html index.htm index.php index.php3 index.php4 index.wml
<IfModule mod_access.c>
Allow from all
</IfModule>
<Files ~ ".shtml$">
deny from all
</Files>
<Files ~ ".inc$">
order allow,deny
deny from all
</Files>
</Directory>

<Directory "/srv/www/confixx/html">
Options +FollowSymLinks
DirectoryIndex index.php index.htm index.html

AllowOverride all

<IfModule mod_access.c>
Allow from all
</IfModule>

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteRule ^reseller/res[0-9]+/(.*)$ reseller/$1 [L]

RewriteRule ^user/[a-zA-Z][-a-zA-Z0-9_]{0,4}[0-9]+/(.*)$ user/$1 [L]

RewriteRule ^ftplogin/[a-zA-Z][-a-zA-Z0-9_]{0,4}[0-9]+/(.*)$ ftplogin/$1 [L]
RewriteRule ^ftplogin/[a-zA-Z][-a-zA-Z0-9_]{0,4}[0-9]+f[0-9]+/(.*)$ ftplogin/$1 [L]

RewriteRule ^poplogin/[a-zA-Z][-a-zA-Z0-9_]{0,4}[0-9]+p[0-9]+/(.*)$ poplogin/$1 [L]

</IfModule>

AddDefaultCharset off

<Files ~ ".shtml$">
deny from all
</Files>
<Files ~ ".inc$">
order allow,deny
deny from all
</Files>
</Directory>

# Default - gesperrt
<VirtualHost <ip-address>:80>
SuexecUserGroup confixx confixx
DocumentRoot /srv/www/confixx/html/gesperrt
</VirtualHost>

<VirtualHost <ip-address>:80>
ServerAdmin webmaster@<myserv>
ServerName http://www.
ServerAlias <myserv>.de

DocumentRoot /srv/www/web1/html
SuexecUserGroup web1 web1
ScriptAlias /cgi-bin/ /srv/www/web1/html/cgi-bin/
CustomLog /srv/www/web1/log/access_log confixx2
php_admin_value open_basedir /srv/www/web1/html/:/srv/www/web1/phptmp/:/srv/www/web1/files/:/srv/www/web1/atd/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /srv/www/web1/phptmp/
</VirtualHost>

<VirtualHost <ip-address>:80>
ServerAdmin webmaster@<myserv>.de
ServerName http://www.
ServerAlias <myserv>.de

DocumentRoot /srv/www/web2/html
SuexecUserGroup web2 web2
ScriptAlias /cgi-bin/ /srv/www/web2/html/cgi-bin/
CustomLog /srv/www/web2/log/access_log confixx2
php_admin_value open_basedir /srv/www/web2/html/:/srv/www/web2/phptmp/:/srv/www/web2/files/:/srv/www/web2/atd/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /srv/www/web2/phptmp/
php_admin_value safe_mode off
</VirtualHost>

<VirtualHost <ip-address>:443>
ServerAdmin webmaster@<myserv>.de
ServerName ssl.<myserv>.de

DocumentRoot /srv/www/web2/html/ssl
SuexecUserGroup web2 web2
ScriptAlias /cgi-bin/ /srv/www/web2/html/cgi-bin/
CustomLog /srv/www/web2/log/access_log confixx2
php_admin_value open_basedir /srv/www/web2/html/:/srv/www/web2/phptmp/:/srv/www/web2/files/:/srv/www/web2/atd/
php_admin_value file_uploads 0

<IfModule mod_dir.c>
DirectoryIndex index.html index.htm index.shtml index.cgi index.php
</IfModule>

<IfModule mod_ssl.c>

SSLEngine on
SSLCertificateKeyFile /etc/apache2/ssl.key/<myserv>.key
SSLCertificateFile /etc/apache2/ssl.crt/<myserv>.crt


SetEnvIf User-Agent ".*MSIE.*"
nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0

<Files ~ ".(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>

<Directory "/srv/www/web2/html/cgi-bin">
SSLOptions +StdEnvVars
</Directory>

</IfModule>


CustomLog /var/log/apache2/<myserv>.ssl.log "%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i""
ErrorLog /var/log/apache2/<myserv>.de_error.ssl.log
</VirtualHost>
/etc/httpd.conf
...der wichtige Ausschnitt...
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80

Listen 80

<IfDefine SSL>
Listen 443
</IfDefine>
und die ausgabe von netstat -l
<myserv>:/etc/apache2 # netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:www-http *:* LISTEN
tcp 0 0 *:ftp *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 *:smtp *:* LISTEN
tcp 0 0 *:https *:* LISTEN
tcp 0 0 *:pop3 *:* LISTEN
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 182328974 /var/lib/mysql/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 207451623 /var/run/sendmail/control
<myserv>:/etc/apache2 #
So, hoffe ihr könnt damit was anfengen :)...

Vielen Dank schonmal

Gruss,
Oliver
wgot
Posts: 1675
Joined: 2003-07-06 02:03
 

Re: Inhalt der config-files

Post by wgot »

Hallo,
hemzet wrote: NameVirtualHost <ip-address>:443
<VirtualHost <ip-address>:443>
DocumentRoot /srv/www/confixx/html/gesperrt
das muß raus.

Der SSL-Vhost muß der erste Vhost auf Port 443 sein.

Rest erstmal nicht weiter angesehen weil das eindeutiger Fehler ist.

Gruß, Wolfgang
hemzet
Posts: 11
Joined: 2004-12-01 11:35
 

gelöst :)!

Post by hemzet »

Rest erstmal nicht weiter angesehen weil das eindeutiger Fehler ist.
Hallo,

also der Eintrag ist dort vorhanden, damit eine korrekte Fehlerseite bei nicht vorhandenen Subdomains angezeigt wird. Dieser steht dort auch richtig.

Habe inzwischen aber den fehler gefunden und das Problem gelöst. Hatte nicht an die ssl.conf gedacht. Sie kollidierte mit den Einstellungen in der httpd.conf und stand noch auf Standard. Also die vHost-Einstellungen in der ssl.conf sowie das

Code: Select all

Listen 443
in der httpd.conf entfernt und nun funktioniert das ganze auch :).

Danke und Gruss
Oliver
Post Reply