mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-19 22:16:49 +00:00
improve reverse proxy conf - add nginx
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
59a49c62b4
commit
ae36403762
1 changed files with 38 additions and 2 deletions
|
|
@ -1,11 +1,17 @@
|
||||||
## Reverse Proxy Config
|
## Reverse Proxy Documentation
|
||||||
|
|
||||||
Basically, you need to specify the port that the apache container shall use and modify the startup command a bit.
|
Basically, you need to specify the port that the apache container shall use and modify the startup command a bit.
|
||||||
|
|
||||||
All examples below will use port `11000` as example apache port. Also it is supposed that the reverse proxy runs on the same server like AIO, hence `localhost` is used and not an internal ip-address to point to the AIO instance. Modify both to your needings.
|
All examples below will use port `11000` as example apache port. Also it is supposed that the reverse proxy runs on the same server like AIO, hence `localhost` is used and not an internal ip-address to point to the AIO instance. Modify both to your needings.
|
||||||
|
|
||||||
### Caddy reverse proxy config example
|
### Reverse proxy config examples
|
||||||
|
|
||||||
|
#### Caddy
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
<summary>click here to expand</summary>
|
||||||
|
<br>
|
||||||
Add this to your Caddyfile:
|
Add this to your Caddyfile:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -17,8 +23,38 @@ https://<your-nc-domain>:443 {
|
||||||
|
|
||||||
Of course you need to modify `<your-nc-domain>` to the domain on which you want to run Nextcloud.
|
Of course you need to modify `<your-nc-domain>` to the domain on which you want to run Nextcloud.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
#### Nginx
|
||||||
|
|
||||||
|
<details>
|
||||||
|
|
||||||
|
<summary>click here to expand</summary>
|
||||||
|
<br>
|
||||||
|
Add this to you nginx config:
|
||||||
|
|
||||||
|
```
|
||||||
|
location / {
|
||||||
|
proxy_pass http://localhost:11000;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
|
# Websocket
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Of course SSL needs to be set up as well e.g. by using certbot and your domain must be also added inside the nginx config.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
### Startup command
|
### Startup command
|
||||||
|
|
||||||
|
After adjusting your reverse proxy config, use the following command to start AIO:
|
||||||
|
|
||||||
```
|
```
|
||||||
# For x64 CPUs:
|
# For x64 CPUs:
|
||||||
sudo docker run -it \
|
sudo docker run -it \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue