Forum Moderators: phranque
i can access my domain like this: www.domain.com:443
this call gives me a
Bad Request
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
thanks a lot
efendi
The solution depends heavily on your current configuration code in your server config files and in .htaccess, so we can't answer that question without seeing the specific directives related to your SSL and non-SSL VirtualHost configurations or knowing which of those files you intend to put the 'solution' code into.
Jim
We need to see just the two VirtualHost containers (SSL and non-SSL), plus the ErrorDocument configuration lines (if they are not in those VirtualHost sections), plus any .htaccess code related to these two pieces of the puzzle.
Thanks,
Jim
this is my conf-file:
NameVirtualHost 127.0.0.1:80<VirtualHost 127.0.0.1:80>
DocumentRoot "/home/sites/site4/web"
ServerName www.domain.com
ServerAlias www.domain.comRewriteEngine On
RewriteOptions inherit
</VirtualHost><VirtualHost 127.0.0.1:443>
DocumentRoot "/home/sites/site4/web"
ServerName www.domain.com
Include /etc/apache2/vhosts.d/error.inc
RewriteEngine On
RewriteCond %{HTTP_HOST} !^127.0.0.1
RewriteCond %{HTTP_HOST} !^www.domain.com
RewriteRule ^/(.*) [domain.com...] [L,R]
Include /etc/apache2/vhosts.d/rw_huw.inc
RewriteOptions inheritSSLEngine On
SSLCertificateFile /home/sites/site4/certs/www.domain.com.crt
SSLCertificateKeyFile /home/sites/site4/certs/key
SSLCACertificateFile /home/sites/site4/certs/intermediate.crt
</VirtualHost>
and this is the htaccess-file
RewriteEngine On
# Redirect non-POST requests for index.php, index.html, or index.htm to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.(html?¦php)\ HTTP/
RewriteCond %{REQUEST_METHOD} !^POST
RewriteCond %{SERVER_PORT}s ^(443(s)¦[0-9]+s)$
RewriteRule ^index\.(html?¦php)$ http%2://www.domain.com/ [R=301,L]# If requested hostname is not IP address, exact canonical domain, or
# blank (for HTTP/1.0), redirect requests to canonical domain
RewriteCond %{HTTP_HOST} !^127.0.0.1$
RewriteCond %{HTTP_HOST} !^(www\.domain\.com)?$
RewriteCond %{SERVER_PORT}s ^(443(s)¦[0-9]+s)$
RewriteRule (.*) http%2://www.domain.com/$1 [R=301,L]# Serve alternate robots.txt for SSL requests
RewriteCond %{SERVER_PORT} =443
RewriteRule ^robots\.txt robots_ssl.txt [L]
thank you
efendi