diff --git a/reverse-proxy.md b/reverse-proxy.md index 6f3e9ccb..b039ddcf 100644 --- a/reverse-proxy.md +++ b/reverse-proxy.md @@ -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. 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 + +
+ +click here to expand +
Add this to your Caddyfile: ``` @@ -17,8 +23,38 @@ https://:443 { Of course you need to modify `` to the domain on which you want to run Nextcloud. +
+ +#### Nginx + +
+ +click here to expand +
+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. + +
+ ### Startup command +After adjusting your reverse proxy config, use the following command to start AIO: + ``` # For x64 CPUs: sudo docker run -it \