Gentoo Archives: gentoo-user

From: "J. Roeleveld" <joost@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Nextcloud-24.0.7 and proxy settings
Date: Tue, 21 Feb 2023 09:56:09
Message-Id: 12172646.O9o76ZdvQC@iris
In Reply to: [gentoo-user] Nextcloud-24.0.7 and proxy settings by Alexander Puchmayr
1 On Sunday, February 19, 2023 1:17:41 PM CET Alexander Puchmayr wrote:
2 > Hi there,
3 >
4 > I'm trying to setup a nextcloud instance inside a DMZ that has no direct
5 > connection to the outside world, only via proxy. The proxy itself is working
6 > fine, but I fail to configure nextcloud to actually use this proxy.
7 >
8 > According to the docs, I tried setting the proxy field in config/config.php,
9 > i.e.
10 >
11 > <?php
12 > $CONFIG = array (
13 > ...
14 > 'proxy' => '10.46.1.109:3128',
15 > 'proxyuserpwd' => '',
16 > ...
17 > );
18 >
19 > But this setting seems to be ignored, tcpdump does not show any connection
20 > attempt to that ip and nextcloud complains that it cannot connect to the
21 > internet.
22 >
23 > In another forum I found that in
24 > /etc/apache2/vhosts.d/10_nextcloud_vhosts.conf, environment variables like
25 > HTTP_PROXY and HTTPS_PROXY may be set, i.e.
26 >
27 > <VirtualHost *:80>
28 > ...
29 > SetEnv HTTP_PROXY 10.46.1.109:3128
30 > SetEnv HTTPS_PROXY 10.46.1.109:3128
31 > ...
32 > </VirtualHost>
33 >
34 > But this also does not seem to work.
35 >
36 > Any other ideas?
37
38 If using "fpm-php", add the following to your config:
39 env[HTTP_PROXY] = 10.46.1.109:3128
40 env[HTTPS_PROXY] = 10.46.1.109:3128
41
42 I have this in:
43 /etc/php/fpm-php8.1/site.conf
44
45 After this, run:
46 /etc/init.d/fpm-php restart
47
48 This is how I got it working on my end.
49
50 --
51 Joost