Witam Was i proszę o pomoc,
Nie rozumiem jak to jest zrobione że serwer żadania https przekierowuje na tomcata a http do apache’a.
Serwer używa jk_mode, są 2 serwisy php i jeden javy i wszystkie mają działać pod tym samym ceryfikatem wg wzoru:
https://serwer/servisPhp1
https://serwer/servisPhp2
https://serwer/servisJava1
jk_mode został tylko dodany do <VirtualHost *:443> ale gdy to wywale to i tak nie działa.
Poniżej pliki konfiguracujne. Jeśli jeszcze jakieś są potrzebne proszę o informację.
1)
Apache.conf
# Include generic snippets of statements
Include conf.d/
# Include the virtual host configurations:
Include sites-enabled/
# Added mode JK on date 01-06-2012 by tomasz
# mod_jk config
# Where to find workers.properties
JkWorkersFile /etc/apache2/workers.properties
# Where to put jk logs
JkLogFile /var/log/apache2/jk.log
JkShmFile /var/log/apache2/jk-runtime-status
# Set the jk log level [debug/error/info]
JkLogLevel debug
# Select the log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
#JkOptions indicate to send SSL KEY SIZE,
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat set the request format
JkRequestLogFormat "%w %V %T"
# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.
2)
/etc/apache2/sites-enabled/myhr.pl.firma.net
<VirtualHost *:80>
<Directory "/var/www/myhr.pl.firma.net">
Options FollowSymLinks
AllowOverride All
</Directory>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
ServerName myhr.pl.firma.net
ServerAlias www.myhr.pl.firma.net
</VirtualHost>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
JkMount / default
JkMount /* default
DirectoryIndex index.jsp index.php index.html
DocumentRoot /var/www/myhr.pl.firma.net
SSLEngine on
SSLCertificateFile /etc/ssl/myhr.pl.firma.net/myhr.pl.firma.net.crt
SSLCertificateKeyFile /etc/ssl/myhr.pl.firma.net/myhr.pl.firma.net.key
ServerName myhr.pl.firma.net
ServerAlias www.myhr.pl.firma.net
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/myhr.pl.firma.net>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
"/etc/apache2/sites-enabled/myhr.pl.firma.net" 65L, 1950C
3)
vim /etc/apache2/workers.properties
#
# This file provides minimal jk configuration properties needed to
# connect to Tomcat.
#
# We define a worker named .default.
workers.tomcat_home=/usr/local/tomcat6/
workers.java_home=/usr/lib/jvm/java-6-sun/
ps=/
worker.list=default
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1