Show More
@@ -1,32 +1,33 b'' | |||||
1 | .. _apache-sub-ref: |
|
1 | .. _apache-sub-ref: | |
2 |
|
2 | |||
3 | Apache URL Prefix Configuration |
|
3 | Apache URL Prefix Configuration | |
4 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
4 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
5 |
|
5 | |||
6 | Use the following example to configure Apache to use a URL prefix. |
|
6 | Use the following example to configure Apache to use a URL prefix. | |
7 |
|
7 | |||
8 | .. code-block:: apache |
|
8 | .. code-block:: apache | |
9 |
|
9 | |||
10 | <Location /<someprefix> > # Change <someprefix> into your chosen prefix |
|
10 | <Location /<someprefix> > # Change <someprefix> into your chosen prefix | |
11 | ProxyPass http://127.0.0.1:5000/<someprefix> |
|
11 | ProxyPass http://127.0.0.1:5000/<someprefix> | |
12 | ProxyPassReverse http://127.0.0.1:5000/<someprefix> |
|
12 | ProxyPassReverse http://127.0.0.1:5000/<someprefix> | |
13 | SetEnvIf X-Url-Scheme https HTTPS=1 |
|
13 | SetEnvIf X-Url-Scheme https HTTPS=1 | |
14 | </Location> |
|
14 | </Location> | |
15 |
|
15 | |||
16 | In addition to the regular Apache setup you will need to add the following |
|
16 | In addition to the regular Apache setup you will need to add the following | |
17 | lines into the ``rhodecode.ini`` file. |
|
17 | lines into the ``rhodecode.ini`` file. | |
18 |
|
18 | |||
|
19 | * Above ``[app:main]`` section of the ``rhodecode.ini`` file add the | |||
|
20 | following section if it doesn't exist yet. | |||
|
21 | ||||
|
22 | .. code-block:: ini | |||
|
23 | ||||
|
24 | [filter:proxy-prefix] | |||
|
25 | use = egg:PasteDeploy#prefix | |||
|
26 | prefix = /<someprefix> # Change <someprefix> into your chosen prefix | |||
|
27 | ||||
19 | * In the the ``[app:main]`` section of your ``rhodecode.ini`` file add the |
|
28 | * In the the ``[app:main]`` section of your ``rhodecode.ini`` file add the | |
20 | following line. |
|
29 | following line. | |
21 |
|
30 | |||
22 | .. code-block:: ini |
|
31 | .. code-block:: ini | |
23 |
|
32 | |||
24 | filter-with = proxy-prefix |
|
33 | filter-with = proxy-prefix | |
25 |
|
||||
26 | * At the end of the ``rhodecode.ini`` file add the following section. |
|
|||
27 |
|
||||
28 | .. code-block:: ini |
|
|||
29 |
|
||||
30 | [filter:proxy-prefix] |
|
|||
31 | use = egg:PasteDeploy#prefix |
|
|||
32 | prefix = /<someprefix> # Change <someprefix> into your chosen prefix |
|
@@ -1,33 +1,36 b'' | |||||
1 | .. _nginx_url-pre: |
|
1 | .. _nginx_url-pre: | |
2 |
|
2 | |||
3 | Nginx URL Prefix Configuration |
|
3 | Nginx URL Prefix Configuration | |
4 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
4 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
5 |
|
5 | |||
6 | Use the following example to configure Nginx to use a URL prefix. |
|
6 | Use the following example to configure Nginx to use a URL prefix. | |
7 |
|
7 | |||
8 | .. code-block:: nginx |
|
8 | .. code-block:: nginx | |
9 |
|
9 | |||
10 | location /foo { |
|
10 | location /foo { | |
11 | rewrite /foo(.*) /$1 break; |
|
11 | rewrite /foo(.*) /$1 break; | |
12 | proxy_pass http://localhost:3200; |
|
12 | proxy_pass http://localhost:3200; | |
13 | proxy_redirect off; |
|
13 | proxy_redirect off; | |
14 | proxy_set_header Host $host; |
|
14 | proxy_set_header Host $host; | |
15 | } |
|
15 | } | |
16 |
|
16 | |||
17 | In addition to the Nginx configuration you will need to add the following |
|
17 | In addition to the Nginx configuration you will need to add the following | |
18 | lines into the ``rhodecode.ini`` file. |
|
18 | lines (if they not exist) into the ``rhodecode.ini`` file. | |
|
19 | ||||
|
20 | * Above ``[app:main]`` section of the ``rhodecode.ini`` file add the | |||
|
21 | following section if it doesn't exist yet. | |||
|
22 | ||||
|
23 | .. code-block:: ini | |||
|
24 | ||||
|
25 | [filter:proxy-prefix] | |||
|
26 | use = egg:PasteDeploy#prefix | |||
|
27 | prefix = /<someprefix> # Change <someprefix> into your chosen prefix | |||
19 |
|
|
28 | ||
20 | * In the the ``[app:main]`` section of your ``rhodecode.ini`` file add the |
|
29 | * In the the ``[app:main]`` section of your ``rhodecode.ini`` file add the | |
21 | following line. |
|
30 | following line. | |
22 |
|
31 | |||
23 | .. code-block:: ini |
|
32 | .. code-block:: ini | |
24 |
|
33 | |||
25 | filter-with = proxy-prefix |
|
34 | filter-with = proxy-prefix | |
26 |
|
35 | |||
27 | * At the end of the ``rhodecode.ini`` file add the following section. |
|
|||
28 |
|
|
36 | ||
29 | .. code-block:: ini |
|
|||
30 |
|
||||
31 | [filter:proxy-prefix] |
|
|||
32 | use = egg:PasteDeploy#prefix |
|
|||
33 | prefix = /<someprefix> # Change <someprefix> into your chosen prefix |
|
General Comments 0
You need to be logged in to leave comments.
Login now