Show More
@@ -1,33 +1,33 b'' | |||
|
1 | 1 | Apache Reverse Proxy |
|
2 | 2 | ^^^^^^^^^^^^^^^^^^^^ |
|
3 | 3 | |
|
4 | 4 | Here is a sample configuration file for using Apache as a reverse proxy. |
|
5 | 5 | |
|
6 | 6 | .. code-block:: apache |
|
7 | 7 | |
|
8 | 8 | <VirtualHost *:80> |
|
9 | 9 | ServerName hg.myserver.com |
|
10 | 10 | ServerAlias hg.myserver.com |
|
11 | 11 | |
|
12 | 12 | ## uncomment to serve static files by Apache |
|
13 | 13 | ## ProxyPass /_static ! |
|
14 |
## Alias /_static /path/to/ |
|
|
14 | ## Alias /_static /path/to/.rccontrol/enterprise-1/static | |
|
15 | 15 | |
|
16 | 16 | <Proxy *> |
|
17 | 17 | Order allow,deny |
|
18 | 18 | Allow from all |
|
19 | 19 | </Proxy> |
|
20 | 20 | |
|
21 | 21 | ## Important ! |
|
22 | 22 | ## Directive to properly generate url (clone url) for pylons |
|
23 | 23 | ProxyPreserveHost On |
|
24 | 24 | |
|
25 | 25 | ## RhodeCode instance running |
|
26 | 26 | ProxyPass / http://127.0.0.1:10002/ |
|
27 | 27 | ProxyPassReverse / http://127.0.0.1:10002/ |
|
28 | 28 | |
|
29 | 29 | ## to enable https use line below |
|
30 | 30 | #SetEnvIf X-Url-Scheme https HTTPS=1 |
|
31 | 31 | |
|
32 | 32 | </VirtualHost> |
|
33 | 33 |
@@ -1,73 +1,73 b'' | |||
|
1 | 1 | Nginx Configuration Example |
|
2 | 2 | --------------------------- |
|
3 | 3 | |
|
4 | 4 | Use the following example to configure Nginx as a your web server. |
|
5 | 5 | |
|
6 | 6 | .. code-block:: nginx |
|
7 | 7 | |
|
8 | 8 | upstream rc { |
|
9 | 9 | |
|
10 | 10 | server 127.0.0.1:10002; |
|
11 | 11 | |
|
12 | 12 | # add more instances for load balancing |
|
13 | 13 | # server 127.0.0.1:10003; |
|
14 | 14 | # server 127.0.0.1:10004; |
|
15 | 15 | } |
|
16 | 16 | |
|
17 | 17 | ## gist alias |
|
18 | 18 | |
|
19 | 19 | server { |
|
20 | 20 | listen 443; |
|
21 | 21 | server_name gist.myserver.com; |
|
22 | 22 | access_log /var/log/nginx/gist.access.log; |
|
23 | 23 | error_log /var/log/nginx/gist.error.log; |
|
24 | 24 | |
|
25 | 25 | ssl on; |
|
26 | 26 | ssl_certificate gist.rhodecode.myserver.com.crt; |
|
27 | 27 | ssl_certificate_key gist.rhodecode.myserver.com.key; |
|
28 | 28 | |
|
29 | 29 | ssl_session_timeout 5m; |
|
30 | 30 | |
|
31 | 31 | ssl_protocols SSLv3 TLSv1; |
|
32 | 32 | ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5; |
|
33 | 33 | ssl_prefer_server_ciphers on; |
|
34 | 34 | add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; |
|
35 | 35 | |
|
36 | 36 | # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits |
|
37 | 37 | ssl_dhparam /etc/nginx/ssl/dhparam.pem; |
|
38 | 38 | |
|
39 | 39 | rewrite ^/(.+)$ https://rhodecode.myserver.com/_admin/gists/$1; |
|
40 | 40 | rewrite (.*) https://rhodecode.myserver.com/_admin/gists; |
|
41 | 41 | } |
|
42 | 42 | |
|
43 | 43 | server { |
|
44 | 44 | listen 443; |
|
45 | 45 | server_name rhodecode.myserver.com; |
|
46 | 46 | access_log /var/log/nginx/rhodecode.access.log; |
|
47 | 47 | error_log /var/log/nginx/rhodecode.error.log; |
|
48 | 48 | |
|
49 | 49 | ssl on; |
|
50 | 50 | ssl_certificate rhodecode.myserver.com.crt; |
|
51 | 51 | ssl_certificate_key rhodecode.myserver.com.key; |
|
52 | 52 | |
|
53 | 53 | ssl_session_timeout 5m; |
|
54 | 54 | |
|
55 | 55 | ssl_protocols SSLv3 TLSv1; |
|
56 | 56 | ssl_ciphers DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:EDH-RSA-DES-CBC3-SHA:AES256-SHA:DES-CBC3-SHA:AES128-SHA:RC4-SHA:RC4-MD5; |
|
57 | 57 | ssl_prefer_server_ciphers on; |
|
58 | 58 | |
|
59 | 59 | include /etc/nginx/proxy.conf; |
|
60 | 60 | |
|
61 | 61 | ## uncomment to serve static files by nginx |
|
62 | 62 | # location /_static { |
|
63 |
# alias /path/to/ |
|
|
63 | # alias /path/to/.rccontrol/enterprise-1/static; | |
|
64 | 64 | # } |
|
65 | 65 | |
|
66 | 66 | location / { |
|
67 | 67 | try_files $uri @rhode; |
|
68 | 68 | } |
|
69 | 69 | |
|
70 | 70 | location @rhode { |
|
71 | 71 | proxy_pass http://rc; |
|
72 | 72 | } |
|
73 | 73 | } |
General Comments 0
You need to be logged in to leave comments.
Login now