You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by kohanm <ko...@gmail.com> on 2008/07/22 21:57:23 UTC

[users@httpd] How whole application accessible with HTTPS and HTTP ( Apache 2.2 +SSL +Tomcat 5.5 + +mod_jk)

Hi,

I set up the * Apache 2.2+SSL+Tomcat 5.5 + mod_Jk*  it works fine with http.
when I use https I get Forbidden errors.

How to configure the Apache2.2 virtual Host  to be accessible the whole
application with https and http the same time(the login link needs to be
implemented with HTTPS for external authentication server which belongs to
another organization)

here are the *httpd.conf* and *httpd-ssl.conf* files.


*httpd.conf file(short describtion):*

 Listen  mydomainIP:80


 LoadModule jk_module modules/mod_jk-apache-2.2.4.so



<IfModule mod_jk.c>

JkWorkersFile conf/workers.properties
JkLogFile logs/mod_jk.log
JkLogLevel error
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"

 Alias /list  "/usr/local/jakarta-tomcat/webapps/list/"

 <Directory "/usr/local/jakarta-tomcat/webapps/list/">
        Options Indexes +FollowSymLinks
        AllowOverride None
        Allow from all
    </Directory>


Alias /example  "/usr/local/jakarta-tomcat/webapps/example/"

 <Directory "/usr/local/jakarta-tomcat/webapps/example/">
        Options Indexes +FollowSymLinks
        AllowOverride None
        Allow from all
    </Directory>


    <Location "/*/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>
 JkMount  /list/*  example
 JkMount /example/* example

</IfModule>


# Secure (SSL/TLS) connections
Include conf/extra/httpd-ssl.conf

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>





*httpd-ssl.conf *

* *



Listen 443


AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

SSLPassPhraseDialog  builtin
SSLSessionCache        shmcb:/usr/local/apache2.2/logs/ssl_scache(512000)
SSLSessionCacheTimeout  300

SSLMutex  file:/usr/local/apache2.2/logs/ssl_mutex


<VirtualHost _default_:443>

#   General setup for the virtual host
DocumentRoot "/usr/local/apache2.2/htdocs"
ServerName mydomain:443
ServerAdmin mk@kk.com
ErrorLog /usr/local/apache2.2/logs/error_log
TransferLog /usr/local/apache2.2/logs/access_log


SSLEngine on

SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile /usr/local/apache2.2/conf/server.crt
SSLCertificateKeyFile /usr/local/apache2.2/conf/server.key


#   Server Private Key:
<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/usr/local/apache2.2/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>
BrowserMatch ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

#   Per-Server Logging:
#   The home of a custom SSL log file. Use this when you want a
#   compact non-error SSL logfile on a virtual host basis.
CustomLog /usr/local/apache2.2/logs/ssl_request_log \
          "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost>

Thanks for your help.

MK