diff options
author | 6543 <6543@obermui.de> | 2020-12-08 04:52:26 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-07 23:52:26 -0500 |
commit | 6bdcacd73b403354aa180bfada7236038d9712b1 (patch) | |
tree | 831f00e67434304c75561df0f163b1ca51c5c157 /docs/content/doc/usage/reverse-proxies.en-us.md | |
parent | e7938c9c44384e044afba14d5a86b1ba32520dd3 (diff) | |
download | gitea-6bdcacd73b403354aa180bfada7236038d9712b1.tar.gz gitea-6bdcacd73b403354aa180bfada7236038d9712b1.zip |
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>
Diffstat (limited to 'docs/content/doc/usage/reverse-proxies.en-us.md')
-rw-r--r-- | docs/content/doc/usage/reverse-proxies.en-us.md | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/docs/content/doc/usage/reverse-proxies.en-us.md b/docs/content/doc/usage/reverse-proxies.en-us.md index 1ca73c3657..89f7ff5c4e 100644 --- a/docs/content/doc/usage/reverse-proxies.en-us.md +++ b/docs/content/doc/usage/reverse-proxies.en-us.md @@ -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. |