Hallo zusammen,
ich beschäftige mich schon tagelang mit diesem thema. es geht darum, dass ich es nicht schaffe den server so einzurichten, dass er sowohl über http als auch über https aufgerufen werden. es funktioniert nur entweder das eine oder das andere.
ich bin u.a. nach diesem tutorial vorgegangen: http://www.tutorials.de/hosting-webserver/164267-apache-virtualhost-ueber-ssl.html#post847383
darin steht, dass man der hosts-datei einen eintrag hinzufügt (127.0.0.1 meinserver.com) und dann zwei vhosts anlegt, <NameVirtualHost meinserver.com:80> und <NameVirtualHost meinserver.com:443> usw.......
wenn ich die conf-dateien so einrichte, funktioniert http, aber https nicht mehr (error 404)
andersrum, mit meiner standard-konfiguration läuft zwar https aber http nicht mehr (error 400).
meine derzeitige konfiguration:
httpd.conf
=======================================================================
httpd-ssl.conf
=======================================================================
httpd-vhosts.conf
=======================================================================
error.log
=======================================================================
access.log
=======================================================================
ssl-request.log
=======================================================================
ich hoffe einige von euch haben meine situation verstanden und können mir wenigstens n bisschen weiterhelfen
Gruß
ich beschäftige mich schon tagelang mit diesem thema. es geht darum, dass ich es nicht schaffe den server so einzurichten, dass er sowohl über http als auch über https aufgerufen werden. es funktioniert nur entweder das eine oder das andere.
ich bin u.a. nach diesem tutorial vorgegangen: http://www.tutorials.de/hosting-webserver/164267-apache-virtualhost-ueber-ssl.html#post847383
darin steht, dass man der hosts-datei einen eintrag hinzufügt (127.0.0.1 meinserver.com) und dann zwei vhosts anlegt, <NameVirtualHost meinserver.com:80> und <NameVirtualHost meinserver.com:443> usw.......
wenn ich die conf-dateien so einrichte, funktioniert http, aber https nicht mehr (error 404)
andersrum, mit meiner standard-konfiguration läuft zwar https aber http nicht mehr (error 400).
meine derzeitige konfiguration:
httpd.conf
=======================================================================
Code:
ServerRoot "C:/xampp/apache"
Listen 80
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
#LoadModule authn_alias_module modules/mod_authn_alias.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
#LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_user_module modules/mod_authz_user.so
##LoadModule autoindex_module modules/mod_autoindex.so # replaced with autoindex_color_module
#LoadModule bucketeer_module modules/mod_bucketeer.so
#LoadModule cache_module modules/mod_cache.so
#LoadModule case_filter_module modules/mod_case_filter.so
#LoadModule case_filter_in_module modules/mod_case_filter_in.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule charset_lite_module modules/mod_charset_lite.so
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_lock_module modules/mod_dav_lock.so
#LoadModule dbd_module modules/mod_dbd.so
#LoadModule deflate_module modules/mod_deflate.so
LoadModule dir_module modules/mod_dir.so
#LoadModule disk_cache_module modules/mod_disk_cache.so
#LoadModule dumpio_module modules/mod_dumpio.so
#LoadModule echo_module modules/mod_echo.so
LoadModule env_module modules/mod_env.so
#LoadModule example_module modules/mod_example.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule filter_module modules/mod_filter.so
LoadModule headers_module modules/mod_headers.so
#LoadModule ident_module modules/mod_ident.so
#LoadModule imagemap_module modules/mod_imagemap.so
LoadModule include_module modules/mod_include.so
LoadModule info_module modules/mod_info.so
LoadModule isapi_module modules/mod_isapi.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule logio_module modules/mod_logio.so
LoadModule log_config_module modules/mod_log_config.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
#LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule mime_module modules/mod_mime.so
#LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule negotiation_module modules/mod_negotiation.so
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
#LoadModule proxy_connect_module modules/mod_proxy_connect.so
#LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule status_module modules/mod_status.so
#LoadModule substitute_module modules/mod_substitute.so
#LoadModule unique_id_module modules/mod_unique_id.so
#LoadModule userdir_module modules/mod_userdir.so
#LoadModule usertrack_module modules/mod_usertrack.so
#LoadModule version_module modules/mod_version.so
#LoadModule vhost_alias_module modules/mod_vhost_alias.so
#
# 3rd party modules
#
LoadModule autoindex_color_module modules/mod_autoindex_color.so
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User daemon
Group daemon
</IfModule>
</IfModule>
ServerAdmin postmaster@localhost
ServerName http://www.meinserver.com
DocumentRoot "C:/xampp/htdocs"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "C:/xampp/htdocs/sys">
Order Allow,Deny
Deny from All
</Directory>
<Directory "C:/xampp/htdocs/portal/uploads">
Order Allow,Deny
Deny from All
</Directory>
<Directory "C:/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<Directory C:/xampp/htdocs/HTTPLogStat>
Order Allow,Deny
Deny from All
</Directory>
<IfModule dir_module>
DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
ErrorLog "logs/error.log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access.log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "C:/xampp/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
DefaultType text/plain
<IfModule mime_module>
TypesConfig "conf/mime.types"
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddHandler cgi-script .cgi .pl .asp
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</IfModule>
<IfModule mime_magic_module>
MIMEMagicFile "conf/magic"
</IfModule>
ErrorDocument 404 https://www.meinserver.com/portal/index.php/404.php
ErrorDocument 501 https://www.meinserver.com/portal/index.php/
# XAMPP specific settings
Include "conf/extra/httpd-xampp.conf"
# Perl settings
Include "conf/extra/perl.conf"
# Server-pool management (MPM specific)
Include "conf/extra/httpd-mpm.conf"
# Multi-language error messages
Include "conf/extra/httpd-multilang-errordoc.conf"
# Fancy directory listings
Include "conf/extra/httpd-autoindex.conf"
# Language settings
Include "conf/extra/httpd-languages.conf"
# User home directories
Include "conf/extra/httpd-userdir.conf"
# Real-time info on requests and configuration
Include "conf/extra/httpd-info.conf"
# Virtual hosts
Include "conf/extra/httpd-vhosts.conf"
# Distributed authoring and versioning (WebDAV)
Include "conf/extra/httpd-dav.conf"
# Implements a proxy/gateway for Apache.
Include "conf/extra/httpd-proxy.conf"
# Various default settings
Include "conf/extra/httpd-default.conf"
# Secure (SSL/TLS) connections
Include "conf/extra/httpd-ssl.conf"
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLSessionCache "shmcb:logs/ssl.scache(512000)"
SSLSessionCacheTimeout 300
</IfModule>
httpd-ssl.conf
=======================================================================
Code:
<IfModule ssl_module>
Listen 443
<IfModule mime_module>
#
# Some MIME-types for downloading Certificates and CRLs
#
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
</IfModule>
SSLPassPhraseDialog builtin
SSLMutex default
NameVirtualHost *:443
<VirtualHost *:443>
# General setup for the virtual host
DocumentRoot "C:/xampp/htdocs"
ServerName www.meinserver.com
ServerAlias https://www.meinserver.com
ServerAdmin postmaster@localhost
ErrorLog "logs/error.log"
<IfModule log_config_module>
CustomLog "logs/access.log" combined
</IfModule>
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /bin/crt/www_meinserver_com.crt
SSLCertificateKeyFile "crt/80_153_48_146.key"
SSLCertificateChainFile "crt/www_meinserver_com.ca-bundle"
<FilesMatch "\.(cgi|shtml|pl|asp|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "C:/xampp/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
CustomLog "logs/ssl_request.log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
</IfModule>
httpd-vhosts.conf
=======================================================================
Code:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.meinserver.com
ServerAdmin postmaster@localhost
DocumentRoot "C:/xampp/htdocs/"
CustomLog "C:/xampp/apache/logs/access.log" common
ErrorLog "C:/xampp/apache/logs/error.log"
</VirtualHost>
error.log
=======================================================================
Code:
[Tue Mar 01 11:50:23 2011] [notice] Digest: generating secret for digest authentication ...
[Tue Mar 01 11:50:23 2011] [notice] Digest: done
[Tue Mar 01 11:50:23 2011] [notice] Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color
PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
[Tue Mar 01 11:50:23 2011] [notice] Server built: Jul 22 2009 11:35:54
[Tue Mar 01 11:50:23 2011] [notice] Parent: Created child process 8208
[Tue Mar 01 11:50:24 2011] [notice] Digest: generating secret for digest authentication ...
[Tue Mar 01 11:50:24 2011] [notice] Digest: done
[Tue Mar 01 11:50:24 2011] [notice] Child 8208: Child process is running
[Tue Mar 01 11:50:24 2011] [notice] Child 8208: Acquired the start mutex.
[Tue Mar 01 11:50:24 2011] [notice] Child 8208: Starting 150 worker threads.
[Tue Mar 01 11:50:24 2011] [notice] Child 8208: Starting thread to listen on port 443.
[Tue Mar 01 11:50:24 2011] [notice] Child 8208: Starting thread to listen on port 80.
access.log
=======================================================================
192.168.1.5 - - [01/Mar/2011:14:48:14 +0100] "GET /portal/templates/tmpl/css/template.css HTTP/1.1" 304 -
"https://www.meinserver.com/portal/index.php/information/start.php" "Mozilla/4.0 (compatible; MSIE
8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR
3.0.30729)"
192.168.1.5 - - [01/Mar/2011:14:48:14 +0100] "GET /portal/images/stories/start_top.png HTTP/1.1" 304 -
"https://www.meinserver.com/portal/index.php/information/start.php" "Mozilla/4.0 (compatible; MSIE
8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR
3.0.30729)"
192.168.1.5 - - [01/Mar/2011:14:48:14 +0100] "GET /portal/templates/tmpl/images/background.png HTTP/1.1" 304 -
"https://www.meinserver.com/portal/index.php/information/start.php" "Mozilla/4.0 (compatible; MSIE
8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR
3.0.30729)"
192.168.1.5 - - [01/Mar/2011:14:48:14 +0100] "GET /portal/templates/tmpl/images/logo.png HTTP/1.1" 304 -
"https://www.meinserver.com/portal/index.php/information/start.php" "Mozilla/4.0 (compatible; MSIE
8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR
3.0.30729)"
192.168.1.5 - - [01/Mar/2011:14:48:14 +0100] "GET /portal/templates/tmpl/images/header.png HTTP/1.1" 304 -
"https://www.meinserver.com/portal/index.php/information/start.php" "Mozilla/4.0 (compatible; MSIE
8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR
3.0.30729)"
192.168.1.5 - - [01/Mar/2011:14:48:20 +0100] "GET /" 400 1107 "-" "-" <-- Aufruf über http://
ssl-request.log
=======================================================================
[01/Mar/2011:14:48:14 +0100] 192.168.1.5 TLSv1 AES128-SHA "GET /portal/index.php/information/xtend.php HTTP/1.1"
3559
[01/Mar/2011:14:48:14 +0100] 192.168.1.5 TLSv1 AES128-SHA "GET /portal/templates/tmpl/css/template.css HTTP/1.1"
-
[01/Mar/2011:14:48:14 +0100] 192.168.1.5 TLSv1 AES128-SHA "GET /portal/images/stories/se_start_top.png HTTP/1.1"
-
[01/Mar/2011:14:48:14 +0100] 192.168.1.5 TLSv1 AES128-SHA "GET /portal/templates/tmpl/images/background.png
HTTP/1.1" -
[01/Mar/2011:14:48:14 +0100] 192.168.1.5 TLSv1 AES128-SHA "GET /portal/templates/tmpl/images/logo.png HTTP/1.1"
-
[01/Mar/2011:14:48:14 +0100] 192.168.1.5 TLSv1 AES128-SHA "GET /portal/templates/tmpl/images/header.png
HTTP/1.1" -
[01/Mar/2011:14:48:20 +0100] 192.168.1.5 - - "GET /" 1107
ich hoffe einige von euch haben meine situation verstanden und können mir wenigstens n bisschen weiterhelfen

Gruß