forked from edavis10/code_snippets
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapache2-for-Redmine-with-mongrel-cluster.conf
67 lines (50 loc) · 2.01 KB
/
apache2-for-Redmine-with-mongrel-cluster.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
NameVirtualHost *:443
<VirtualHost *:443>
SSLEngine on
# Self-signed
# SSLCertificateFile /etc/apache2/apache.pem
#SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/apache2/ssl/projects.littlestreamsoftware.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/projects.littlestreamsoftware.com.key
# this is only needed for GoDaddy certificates
SSLCertificateChainFile /etc/apache2/ssl/gd_bundle.crt
RequestHeader set X_FORWARDED_PROTO 'https'
ServerAdmin webmaster@localhost
RewriteEngine On
PassengerEnabled off
DocumentRoot /home/websites/projects.littlestreamsoftware.com/current/public
<Directory "/home/websites/projects.littlestreamsoftware.com/current/public">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Proxy balancer://redmine_cluster>
BalancerMember http://127.0.0.1:12000
BalancerMember http://127.0.0.1:12001
</Proxy>
# These directories should always be served up by Apache, since they contain static content. Or just let rails do it.
ProxyPass /images !
ProxyPass /stylesheets !
ProxyPass /javascripts !
ProxyPass /favicon.ico !
ProxyPass / balancer://redmine_cluster/
ProxyPassReverse / balancer://redmine_cluster/
# Uncomment for rewrite debugging
# RewriteLog /tmp/myapp_rewrite_log
# RewriteLogLevel 9
# Check for maintenance file and redirect all requests
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]
# Rewrite index to check for static
RewriteRule ^/$ /cache/index.html [QSA]
# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ /cache/$1.html [QSA]
RewriteRule ^/(.*)$ balancer://redmine_cluster%{REQUEST_URI} [P,QSA,L]
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/admin-access.log combined
ServerSignature Off
Include /etc/apache2/common/hide-svn
Include /etc/apache2/common/deflate
</VirtualHost>