Using Apache 2.4 on OS X Yosemite. Need to modify this virtual host for it to redirect http://server.kibana
and http://www.server.kibana
to https://server.kibana
Here is the Vhost:
<VirtualHost *:8443>
ServerName www.server.kibana
ServerAlias server.kibana
ServerAdmin [email protected]
# RedirectPermanent http://server.kibana https://server.kibana
# DocumentRoot /usr/local/var/www/kibana-4.0.2-darwin-x64/src/public
SSLEngine on
SSLCertificateFile "/usr/local/etc/apache2/2.4/ssl-keys/server.crt"
SSLCertificateKeyFile "/usr/local/etc/apache2/2.4/ssl-keys/server.key"
#
# Proxy
#
ProxyRequests Off
<Proxy *>
Order Allow,Deny
Allow from all
AuthType Basic
AuthName "Authenticated proxy"
AuthUserFile /usr/local/etc/apache2/2.4/elastic.htpwd
Require valid-user
</Proxy>
ProxyPass / http://127.0.0.1:5601
ProxyPassReverse / http://127.0.0.1:5601
RewriteEngine on
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule .* http://127.0.0.1:5601%{REQUEST_URI} [P,QSA]
ErrorLog /usr/local/var/log/apache2/kibana_error.log
LogLevel warn
CustomLog /usr/local/var/log/apache2/kibana_access.log combined
</VirtualHost>
Any suggestions what to add or how to modify the RewriteRule and RewriteCond? Thanx!