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,13 +13,15 @@ menu:
|
|||
identifier: "command-line"
|
||||
---
|
||||
|
||||
## Command Line
|
||||
# Command Line
|
||||
|
||||
### Usage
|
||||
{{< toc >}}
|
||||
|
||||
## Usage
|
||||
|
||||
`gitea [global options] command [command or global options] [arguments...]`
|
||||
|
||||
### Global options
|
||||
## Global options
|
||||
|
||||
All global options can be placed at the command level.
|
||||
|
||||
|
@ -32,9 +34,9 @@ All global options can be placed at the command level.
|
|||
NB: The defaults custom-path, config and work-path can also be
|
||||
changed at build time (if preferred).
|
||||
|
||||
### Commands
|
||||
## Commands
|
||||
|
||||
#### web
|
||||
### web
|
||||
|
||||
Starts the server:
|
||||
|
||||
|
@ -51,7 +53,7 @@ Starts the server:
|
|||
Linux: `sudo setcap 'cap_net_bind_service=+ep' /path/to/gitea`. This will need to be
|
||||
redone every time you update Gitea.
|
||||
|
||||
#### admin
|
||||
### admin
|
||||
|
||||
Admin operations:
|
||||
|
||||
|
@ -229,7 +231,7 @@ Admin operations:
|
|||
- `gitea admin auth update-ldap-simple --id 1 --name "my ldap auth source"`
|
||||
- `gitea admin auth update-ldap-simple --id 1 --username-attribute uid --firstname-attribute givenName --surname-attribute sn`
|
||||
|
||||
#### cert
|
||||
### cert
|
||||
|
||||
Generates a self-signed SSL certificate. Outputs to `cert.pem` and `key.pem` in the current
|
||||
directory and will overwrite any existing files.
|
||||
|
@ -247,7 +249,7 @@ directory and will overwrite any existing files.
|
|||
- Examples:
|
||||
- `gitea cert --host git.example.com,example.com,www.example.com --ca`
|
||||
|
||||
#### dump
|
||||
### dump
|
||||
|
||||
Dumps all files and databases into a zip file. Outputs into a file like `gitea-dump-1482906742.zip`
|
||||
in the current directory.
|
||||
|
@ -262,7 +264,7 @@ in the current directory.
|
|||
- `gitea dump`
|
||||
- `gitea dump --verbose`
|
||||
|
||||
#### generate
|
||||
### generate
|
||||
|
||||
Generates random values and tokens for usage in configuration file. Useful for generating values
|
||||
for automatic deployments.
|
||||
|
@ -278,7 +280,7 @@ for automatic deployments.
|
|||
- `gitea generate secret JWT_SECRET`
|
||||
- `gitea generate secret SECRET_KEY`
|
||||
|
||||
#### keys
|
||||
### keys
|
||||
|
||||
Provides an SSHD AuthorizedKeysCommand. Needs to be configured in the sshd config file:
|
||||
|
||||
|
@ -300,14 +302,14 @@ writable by group or others. The program must be specified by an absolute
|
|||
path.
|
||||
NB: Gitea must be running for this command to succeed.
|
||||
|
||||
#### migrate
|
||||
### migrate
|
||||
Migrates the database. This command can be used to run other commands before starting the server for the first time.
|
||||
This command is idempotent.
|
||||
|
||||
#### convert
|
||||
### convert
|
||||
Converts an existing MySQL database from utf8 to utf8mb4.
|
||||
|
||||
#### doctor
|
||||
### doctor
|
||||
Diagnose the problems of current gitea instance according the given configuration.
|
||||
Currently there are a check list below:
|
||||
|
||||
|
@ -332,7 +334,7 @@ var checklist = []check{
|
|||
|
||||
This function will receive a command line context and return a list of details about the problems or error.
|
||||
|
||||
##### doctor recreate-table
|
||||
#### doctor recreate-table
|
||||
|
||||
Sometimes when there are migrations the old columns and default values may be left
|
||||
unchanged in the database schema. This may lead to warning such as:
|
||||
|
@ -362,7 +364,7 @@ gitea doctor recreate-table
|
|||
|
||||
It is highly recommended to back-up your database before running these commands.
|
||||
|
||||
#### manager
|
||||
### manager
|
||||
|
||||
Manage running server operations:
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ for them to be recognized. For example, they should not be included inside code
|
|||
text. They should also be reasonably cleared from their surrounding text
|
||||
(for example, using spaces).
|
||||
|
||||
{{< toc >}}
|
||||
|
||||
## User, Team and Organization Mentions
|
||||
|
||||
When a text in the form `@username` is found and `username` matches the name
|
||||
|
|
|
@ -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