##// END OF EJS Templates
docs: updated apache/nginx configs
marcink -
r120:abd64f5a default
parent child Browse files
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 ## uncomment root directive if you want to serve static files by nginx
13 ## requires static_files = false in .ini file
14 DocumentRoot /path/to/installation/rhodecode/public
12 ## uncomment root directive if you want to serve static files by
13 ## Apache requires static_files = false in .ini file
14 #DocumentRoot /path/to/rhodecode/installation/public
15 15
16 16 <Proxy *>
17 17 Order allow,deny
18 18 Allow from all
19 19 </Proxy>
20 20
21 #important !
22 #Directive to properly generate url (clone url) for pylons
21 ## Important !
22 ## Directive to properly generate url (clone url) for pylons
23 23 ProxyPreserveHost On
24 24
25 #rhodecode instance
26 ProxyPass / http://127.0.0.1:5000/
27 ProxyPassReverse / http://127.0.0.1:5000/
25 ## RhodeCode instance running
26 ProxyPass / http://127.0.0.1:10002/
27 ProxyPassReverse / http://127.0.0.1:10002/
28 28
29 #to enable https use line below
29 ## to enable https use line below
30 30 #SetEnvIf X-Url-Scheme https HTTPS=1
31 31
32 32 </VirtualHost>
33 33
@@ -1,71 +1,72 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 server 127.0.0.1:5000;
10 server 127.0.0.1:10002;
11 11
12 12 # add more instances for load balancing
13 # server 127.0.0.1:5001;
14 # server 127.0.0.1:5002;
13 # server 127.0.0.1:10003;
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 ## uncomment root directive if you want to serve static files by nginx
60 60 ## requires static_files = false in .ini file
61 # root /path/to/installation/rhodecode/public;
61 # root /path/to/rhodecode/installation/public;
62 62
63 63 include /etc/nginx/proxy.conf;
64 location / {
65 try_files $uri @rhode;
66 }
64
65 location / {
66 try_files $uri @rhode;
67 }
67 68
68 69 location @rhode {
69 proxy_pass http://rc;
70 }
70 proxy_pass http://rc;
71 }
71 72 }
General Comments 0
You need to be logged in to leave comments. Login now