Changes between Version 4 and Version 5 of ApacheConfig


Ignore:
Timestamp:
04/29/09 14:53:16 (9 years ago)
Author:
joshuadf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ApacheConfig

    v4 v5  
    8080this to your non-SSL config: 
    8181{{{ 
    82   RewriteEngine on 
    83   RewriteRule ^/(.*) https://testsig.biostr.washington.edu/$1 [R] 
     82  RedirectMatch ^/?(.*)$ https://testsig.biostr.washington.edu/$1 
    8483}}} 
    8584 
    8685Now restart Apache, open port 443 in the firewall, and visit  
    8786https://testsig.biostr.washington.edu in a web browser. 
     87 
     88== Tomcat passthough == 
     89 
     90You can configure [http://kbase.redhat.com/faq/docs/DOC-10057 mod_proxy_ajp] to pass  
     91certain requests to your webapp. You can even pass all requests through your  
     92SSL configuration: 
     93 
     94{{{ 
     95  ProxyPass /mywebapp/ ajp://localhost:8009/mywebapp/ 
     96 
     97  # redirect root and mywebapps requests to SSL 
     98  RedirectMatch ^(/)?$ https://testsig.biostr.washington.edu/mywebapp/MainMenu 
     99  RedirectMatch ^/mywebapp/?(.*)$ https://testsig.biostr.washington.edu/mywebapp/$1 
     100}}} 
     101 
     102== Complete vhost example == 
     103 
     104Below is a complete conf file suitable for dropping in `/etc/httpd/conf.d/` 
     105{{{ 
     106# not SSL - do nothing but redirect to secure connection 
     107<VirtualHost *:80> 
     108  ServerName testserver.bmi.iths.org 
     109  ServerAlias testserver.bmi testserver *.bmi.iths.org 
     110  RedirectMatch ^(/)?$ https://testserver.bmi.iths.org/mywebapp/MainMenu 
     111  RedirectMatch ^/mywebapp/?(.*)$ https://testserver.bmi.iths.org/mywebapp/$1 
     112</VirtualHost> 
     113 
     114# SSL - UW signed certs.cac.washington.edu 
     115<VirtualHost *:443> 
     116  DocumentRoot /var/www/html 
     117  ServerName testserver.bmi.iths.org 
     118  ServerAlias testserver.bmi testserver *.bmi.iths.org 
     119 
     120  # tomcat pass-through 
     121  ProxyPass /mywebapp/ ajp://localhost:8009/mywebapp/ 
     122  RedirectMatch ^(/)?$ https://testserver.bmi.iths.org/mywebapp/MainMenu 
     123 
     124  SSLEngine on 
     125  SSLCertificateFile /etc/pki/tls/certs/localhost.crt 
     126  SSLCertificateKeyFile /etc/pki/tls/private/localhost.key 
     127  <Files ~ "\.(cgi|shtml)$"> 
     128  SSLOptions +StdEnvVars 
     129  </Files> 
     130  SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown 
     131 
     132</VirtualHost> 
     133}}} 
     134}}}