aboutsummaryrefslogtreecommitdiff
path: root/config/rhodecode
blob: a13dc6161a8defdeccc37cadcca104e8706bb627 (plain)
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
68
69
70
71
72
73
AliasMatch ^/images/(.*)$ /home/rhodecode/rhodecode/rhodecode/public/images/$1
AliasMatch ^/css/(.*)$ /home/rhodecode/rhodecode/rhodecode/public/css/$1
AliasMatch ^/js/(.*)$ /home/rhodecode/rhodecode/rhodecode/public/js/$1

<Location /images >
    ProxyPass !
</Location>

<Location /css >
    ProxyPass !
</Location>

<Location /js >
    ProxyPass !
</Location>

ExpiresActive   on
ExpiresDefault  "access plus 300 seconds"

ExpiresByType   text/css        "access plus 1 day"
ExpiresByType   text/javascript "access plus 1 day"
ExpiresByType   image/png       "access plus 1 month"
ExpiresByType   image/jpg       "access plus 1 month"
ExpiresByType   image/jpeg      "access plus 1 month"
ExpiresByType   image/x-icon    "access plus 1 month"

<IfModule mod_headers.c>
    Header append Cache-Control "public, no-transform"
</IfModule>

<VirtualHost *:80>
        ServerName XXXX
        ServerAlias XXXX

        <Proxy *>
          Order allow,deny
          Allow from all
        </Proxy>

        # Directive to properly generate url (clone url) for pylons
        ProxyPreserveHost On

        #rhodecode instance
        ProxyPass / http://127.0.0.1:5000/
        ProxyPassReverse / http://127.0.0.1:5000/

        # To enable https use line below
        SetEnvIf X-Url-Scheme https HTTPS=1
</VirtualHost>

<VirtualHost *:443>
        ServerName XXXX
        ServerAlias XXXX

        SSLEngine On
        SSLCertificateFile /etc/ssl/certs/XXXX
        SSLCertificateKeyFile /etc/ssl/private/XXXX

        <Proxy *>
          Order allow,deny
          Allow from all
        </Proxy>

        # Directive to properly generate url (clone url) for pylons
        ProxyPreserveHost On

        #rhodecode instance
        ProxyPass / http://127.0.0.1:5000/
        ProxyPassReverse / http://127.0.0.1:5000/

        # To enable https use line below
        SetEnvIf X-Url-Scheme https HTTPS=1
</VirtualHost>