Bläddra i källkod

Add proxy configuration on nextcloud server

DricomDragon 4 år sedan
förälder
incheckning
0fc470b84c
1 ändrade filer med 13 tillägg och 2 borttagningar
  1. 13 2
      Guides/nextcloud.md

+ 13 - 2
Guides/nextcloud.md

@@ -8,9 +8,9 @@ Installed by checking _nexcloud_ on Ubuntu installation wizard. Can be installed
 
 ## Configure proxy
 
-_Use case : ports 80 and 443 are directed to my raspberry pi, and domain name cloud.me.ovh must be redirected to my nexcloud server on IP 192.168.1.110_
+_Use case : ports 80 and 443 are directed to my raspberry pi (with local IP 192.168.1.100), and domain name cloud.me.ovh must be redirected to my nexcloud server on IP 192.168.1.110_
 
-Use proxy setting (more info on private httpd repo):
+Configure proxy setting on pi (more info on private httpd repo):
 
 ```apache
 <VirtualHost *:80>
@@ -22,6 +22,16 @@ Use proxy setting (more info on private httpd repo):
 </VirtualHost>
 ```
 
+Add a file `proxy.config.php` in folder _/var/snap/nextcloud/current/nextcloud/config_ with following content :
+
+```php
+<?php
+
+$CONFIG = [
+        'trusted_proxies'   => ['192.168.1.100'],
+];
+```
+
 ## Trust domain
 
 Add a file `trust_domain.config.php` in folder _/var/snap/nextcloud/current/nextcloud/config_ with following content :
@@ -41,3 +51,4 @@ $CONFIG = [
 ```
 
 No need to restart system, config is taken into account at web page reload.
+