Skip to content

Commit b44d985

Browse files
authored
Merge branch 'main' into user-avatar-link-abs
2 parents d2fbf31 + 932780c commit b44d985

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

docs/content/doc/usage/reverse-proxies.en-us.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,3 +292,50 @@ If you wish to run Gitea with IIS. You will need to setup IIS with URL Rewrite a
292292
</system.webServer>
293293
</configuration>
294294
```
295+
296+
## HAProxy
297+
298+
If you want HAProxy to serve your Gitea instance, you can add the following to your HAProxy configuration
299+
300+
add an acl in the frontend section to redirect calls to gitea.example.com to the correct backend
301+
```
302+
frontend http-in
303+
...
304+
acl acl_gitea hdr(host) -i gitea.example.com
305+
use_backend gitea if acl_gitea
306+
...
307+
```
308+
309+
add the previously defined backend section
310+
```
311+
backend gitea
312+
server localhost:3000 check
313+
```
314+
315+
If you redirect the http content to https, the configuration work the same way, just remember that the connexion between HAProxy and Gitea will be done via http so you do not have to enable https in Gitea's configuration.
316+
317+
## HAProxy with a sub-path
318+
319+
In case you already have a site, and you want Gitea to share the domain name, you can setup HAProxy to serve Gitea under a sub-path by adding the following to you HAProxy configuration:
320+
321+
```
322+
frontend http-in
323+
...
324+
acl acl_gitea path_beg /gitea
325+
use_backend gitea if acl_gitea
326+
...
327+
```
328+
329+
With that configuration http://example.com/gitea/ will redirect to your Gitea instance.
330+
331+
then for the backend section
332+
```
333+
backend gitea
334+
http-request replace-path /gitea\/?(.*) \/\1
335+
server localhost:3000 check
336+
```
337+
338+
The added http-request will automatically add a trailing slash if needed and internally remove /gitea from the path to allow it to work correctly with Gitea by setting properly http://example.com/gitea as the root.
339+
340+
Then you **MUST** set something like `[server] ROOT_URL = http://example.com/gitea/` correctly in your configuration.
341+

options/locale/locale_zh-TW.ini

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ change_username=您的帳號已更改。
520520
change_username_prompt=注意:修改帳號也會更改您的帳戶的 URL。
521521
change_username_redirect_prompt=舊的帳號被領用前,會重新導向您的新帳號。
522522
continue=繼續操作
523-
cancel=取消操作
523+
cancel=取消
524524
language=語言
525525
ui=佈景主題
526526
privacy=隱私
@@ -926,6 +926,9 @@ star_guest_user=登入以為此儲存庫加上星號。
926926
copy_link=複製連結
927927
copy_link_success=已複製連結
928928
copy_link_error=請按下 ⌘-C 或 Ctrl-C 複製
929+
copy_branch=複製
930+
copy_branch_success=已複製分支名稱
931+
copy_branch_error=按下 ⌘C 或 Ctrl-C 以複製
929932
copied=複製成功
930933
unwatch=取消關注
931934
watch=關注
@@ -980,6 +983,7 @@ commit_graph=提交線圖
980983
commit_graph.select=選擇分支
981984
commit_graph.hide_pr_refs=隱藏合併請求
982985
commit_graph.monochrome=單色
986+
commit_graph.color=彩色
983987
blame=Blame
984988
normal_view=標準檢視
985989
line=行
@@ -1096,6 +1100,7 @@ projects.board.set_default=設為預設
10961100
projects.board.set_default_desc=將此看板設定為未分類問題及合併請求的預設看板
10971101
projects.board.delete=刪除看板
10981102
projects.board.deletion_desc=刪除專案看板會將所有相關的問題移動到「未分類」,是否繼續?
1103+
projects.board.color=顏色
10991104
projects.open=開啟
11001105
projects.close=關閉
11011106

@@ -1799,6 +1804,7 @@ settings.content_type=POST Content Type
17991804
settings.secret=Secret
18001805
settings.slack_username=服務名稱
18011806
settings.slack_icon_url=圖標 URL
1807+
settings.slack_color=顏色
18021808
settings.discord_username=使用者名稱
18031809
settings.discord_icon_url=Icon URL
18041810
settings.event_desc=觸發條件:

0 commit comments

Comments
 (0)