httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mehta, Anish" <>
Subject RE: [users@httpd] Issue with SSL configuration.
Date Thu, 30 Oct 2008 14:21:16 GMT
Define following in your httpd.conf. This will change the URL to HTTPS
even if someone types in HTTP.


Listen *:80


<VirtualHost *:80>



    RewriteEngine On

    RewriteCond          %{HTTPS} !=on

    RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R,NC]


    Header unset X-Powered-By



Then make changes to your httpd/conf.d/ssl.conf VirtualHost
configuration as follows:


<VirtualHost _default_:443>


# General setup for the virtual host, inherited from global

DocumentRoot "/var/www/html"

ServerName <IP address of the web server>:443



ErrorLog logs/ssl_error_log

TransferLog logs/ssl_access_log

LogLevel warn


SSLEngine on


SSLProtocol -ALL +SSLv3 +TLSv1




SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt

SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key


<Files ~ "\.(cgi|shtml|phtml|php3?)$">

    SSLOptions +StdEnvVars


<Directory "/var/www/cgi-bin">

    SSLOptions +StdEnvVars



SetEnvIf User-Agent ".*MSIE.*" \

         nokeepalive ssl-unclean-shutdown \

         downgrade-1.0 force-response-1.0


CustomLog logs/ssl_request_log \

          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"


RewriteEngine On

    RewriteCond          %{HTTPS} !=on

    RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R,NC]




If your application was working without SSL, it should work with SSL
(HTTPS URL) after you make these changes






From: Vasanth Kumar ravi [] 
Sent: Thursday, October 30, 2008 1:30 AM
Subject: Re: [users@httpd] Issue with SSL configuration.


Can someone throw light on this issue.


On Wed, Oct 29, 2008 at 4:28 PM, Vasanth Kumar ravi
<> wrote:

Thanks folks..
After posting this in the forum , I did an extensive research on the
internet and it was resolved.
Major problem was due to the Virtual host configuration..Now i am able
to use the SSL at the apache level.

wildcard NameVirtualHosts and _default_ servers:
*:443                  is a NameVirtualHost
         default server
         port 443 namevhost
         port 443 namevhost
*:80                   is a NameVirtualHost
         default server
         port 80 namevhost
         port 80 namevhost

I need your help in some configuration ideas.
I m trying to setup something like the below.
Client <---SSL---> Apache <---HTTP---> WebLogic

I request http://<hostname>/OPSWeb/neo from the browser and it goes to
the login page and I am able to perform all the functions.
When I request https://<hostname>/OPSWeb/neo , it doesnt give a login
page, but it gives a pop-up in IE "Access is Denied. Type Error"
As stated earlier, I need to have HTTPS between the browser and the web
server and HTTP between the Apache and Weblogic.
Also there is no SSL enabled at the Weblogic level.

Do we have to write some ProxyReverse Parameters/Rewrite rules.
Let me know if you need any further details.

Please advise.

On Tue, Oct 28, 2008 at 10:35 PM, Krist van Besien
<> wrote:

On Tue, Oct 28, 2008 at 3:36 AM, Vasanth Kumar ravi
<> wrote:

> SSLCertificateFile /usr/share/ssl/certs/server.crt/
> SSLCertificateKeyFile /usr/share/ssl/certs/server.key/

The argument to SSLCertifacateFile and  SSLCertificateKeyFile is a
_file_, not a directory. Just enter the full path to your cert and
private key here.

> I had copied the certs to the openssl certs directory and created
> for them.

Creating hashkeys is not necessary. Apache knows where to find its
cert if you give  SSLCertificateFile the correct value.


Bremgarten b. Bern, Switzerland
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

The official User-To-User support forum of the Apache HTTP Server
See <URL:> for more info.
To unsubscribe, e-mail:
  "   from the digest:
For additional commands, e-mail:

Vasanth Kumar Ravi

Vasanth Kumar Ravi

View raw message