mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Added Table of Contents to long documentation pages (#13890)
* Redo #13836 with new shortcode (https://gitea.com/gitea/theme/pulls/90) * add Api Usage Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
e7938c9c44
commit
6bdcacd73b
20 changed files with 82 additions and 66 deletions
|
@ -13,7 +13,11 @@ menu:
|
|||
identifier: "reverse-proxies"
|
||||
---
|
||||
|
||||
## Using Nginx as a reverse proxy
|
||||
# Reverse Proxies
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## Nginx
|
||||
If you want Nginx to serve your Gitea instance, add the following `server` section to the `http` section of `nginx.conf`:
|
||||
|
||||
```
|
||||
|
@ -27,7 +31,7 @@ server {
|
|||
}
|
||||
```
|
||||
|
||||
## Using Nginx with a sub-path as a reverse proxy
|
||||
## Nginx with a sub-path
|
||||
|
||||
In case you already have a site, and you want Gitea to share the domain name, you can setup Nginx to serve Gitea under a sub-path by adding the following `server` section inside the `http` section of `nginx.conf`:
|
||||
|
||||
|
@ -44,7 +48,7 @@ server {
|
|||
|
||||
Then set `[server] ROOT_URL = http://git.example.com/git/` in your configuration.
|
||||
|
||||
## Using Nginx as a reverse proxy and serve static resources directly
|
||||
## Nginx and serve static resources directly
|
||||
We can tune the performance in splitting requests into categories static and dynamic.
|
||||
|
||||
CSS files, JavaScript files, images and web fonts are static content.
|
||||
|
@ -61,7 +65,7 @@ After this, run `make frontend` in the repository directory to generate the stat
|
|||
Depending on the scale of your user base, you might want to split the traffic to two distinct servers,
|
||||
or use a cdn for the static files.
|
||||
|
||||
### using a single node and a single domain
|
||||
### Single node and single domain
|
||||
|
||||
Set `[server] STATIC_URL_PREFIX = /_/static` in your configuration.
|
||||
|
||||
|
@ -80,7 +84,7 @@ server {
|
|||
}
|
||||
```
|
||||
|
||||
### using two nodes and two domains
|
||||
### Two nodes and two domains
|
||||
|
||||
Set `[server] STATIC_URL_PREFIX = http://cdn.example.com/gitea` in your configuration.
|
||||
|
||||
|
@ -112,7 +116,7 @@ server {
|
|||
}
|
||||
```
|
||||
|
||||
## Using Apache HTTPD as a reverse proxy
|
||||
## Apache HTTPD
|
||||
|
||||
If you want Apache HTTPD to serve your Gitea instance, you can add the following to your Apache HTTPD configuration (usually located at `/etc/apache2/httpd.conf` in Ubuntu):
|
||||
|
||||
|
@ -131,7 +135,7 @@ Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`
|
|||
|
||||
If you wish to use Let's Encrypt with webroot validation, add the line `ProxyPass /.well-known !` before `ProxyPass` to disable proxying these requests to Gitea.
|
||||
|
||||
## Using Apache HTTPD with a sub-path as a reverse proxy
|
||||
## Apache HTTPD with a sub-path
|
||||
|
||||
In case you already have a site, and you want Gitea to share the domain name, you can setup Apache HTTPD to serve Gitea under a sub-path by adding the following to you Apache HTTPD configuration (usually located at `/etc/apache2/httpd.conf` in Ubuntu):
|
||||
|
||||
|
@ -153,7 +157,7 @@ Then set `[server] ROOT_URL = http://git.example.com/git/` in your configuration
|
|||
|
||||
Note: The following Apache HTTPD mods must be enabled: `proxy`, `proxy_http`
|
||||
|
||||
## Using Caddy as a reverse proxy
|
||||
## Caddy
|
||||
|
||||
If you want Caddy to serve your Gitea instance, you can add the following server block to your Caddyfile:
|
||||
|
||||
|
@ -171,7 +175,7 @@ git.example.com {
|
|||
}
|
||||
```
|
||||
|
||||
## Using Caddy with a sub-path as a reverse proxy
|
||||
## Caddy with a sub-path
|
||||
|
||||
In case you already have a site, and you want Gitea to share the domain name, you can setup Caddy to serve Gitea under a sub-path by adding the following to your server block in your Caddyfile:
|
||||
|
||||
|
@ -194,7 +198,7 @@ git.example.com {
|
|||
|
||||
Then set `[server] ROOT_URL = http://git.example.com/git/` in your configuration.
|
||||
|
||||
## Using IIS as a reverse proxy
|
||||
## IIS
|
||||
|
||||
If you wish to run Gitea with IIS. You will need to setup IIS with URL Rewrite as reverse proxy.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue