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