mod jk - Setting up Apache mod_jk in ssl VirtualHost -
i'm having problems moving apache mod_jk configuration form own virtualhost configuration main ssl virtualhost configuration.
tomcat working ok using own domain using mod_jk , virtualhost configuration - working config....
loadmodule jk_module /etc/httpd/modules/mod_jk.so jkworkersfile /etc/httpd/conf.d/workers.properties jkshmfile /var/log/httpd/mod_jk.shm jklogfile /var/log/httpd/mod_jk.log jkloglevel info jklogstampformat "[%a %b %d %h:%m:%s %y] " <virtualhost *:80> servername <my cname> documentroot /opt/appserver/webapps/root directoryindex index_page.jsp <directory /> options followsymlinks allowoverride none </directory> <directory /opt/appserver/webapps/root> allowoverride none options followsymlinks order allow,deny allow </directory> jkmount /* ajp13 </virtualhost>
however because want embed tomcat forms in main server pages ssl (can't mix http , https) need move mod_jk configuration main ssl virtualhost subfolder. i've tried following changes, tomcat error 'http status 404 - /servlet/' when trying access https://
new server config:
<virtualhost _default_:443> ...lots of main ssl server config stuff... alias /servlet /opt/appserver/webapps/root jkmount /servlet/* ajp13 <directory /opt/appserver/webapps/root> allowoverride none options followsymlinks order allow,deny allow directoryindex index_page.jsp </directory> </virtualhost>
- make sure domain certificate generated accurately
- copy *key.pem , *cert.pem within /etc/apache2/ directory
- write following
<virtualhost _default_:443> documentroot "/opt/appserver/webapps/your-project-directory" servername yourdomain.com errorlog "/var/log/apache2/https_yourdomain.com-error_log" customlog "/var/log/apache2/https_yourdomain.com-access_log" common sslengine on sslcertificatefile /etc/apache2/*cert.pem sslcertificatekeyfile /etc/apache2/*key.pem jkmountcopy on jkmount /* ajp13 </virtualhost>
- add listen 443 in /etc/httpd/httpd.conf file, add line under listen 80 find @ beginning of it.
now can access both http , https
Comments
Post a Comment