Internet access via proxy not possible

Hello,

I have a problem with a freshly installed Nextcloud instance. It’s my first instance that requires an internet proxy (without authentication) to get on the internet. In the documentation I also came across the corresponding entry for config.php, which looks like this for me:
‘proxy’ => ‘xxx.xxx.xxx:3128’,
Unfortunately I still can’t get access to the internet to install APPs or updates.

Does anyone have an idea why it does not work? Firewall rules and co. won’t be it, as I can load content via wget for example (system proxy).

The log says the following:
“GuzzleHttp\Exception\RequestException: cURL error 49: Couldn’t parse CURLOPT_RESOLVE entry ‘www.nextcloud.com:80:’! (see libcurl - Error Codes) for http://www.nextcloud.com/
→ External DNS resolution is not possible, everything should go through the proxy. Is that Maybe is the problem?
→ Maybe a missing PHP module?

Nextcloud version: 24.0.3
Ubuntu version: 22.04.1 LTS
PHP: 8.1

Thanks a lot for the answers!

It is very useless to use an internet proxy for TLS end-to-end-encrypted connections between a Nextcloud server and e.g. Nextcloud App Server. Tell your network admin that this is nonsense. Use NAT instead.

The proxy performs a filtering function with blacklists and cannot be disabled in our system. And in my opinion, this is nothing special in a corporate network. I mean, otherwise there is no problem with the proxy in other applications!

Yes. Today proxys only can filter on ip/domain layer and realize user authentication. Because of TLS virus scanning on the proxy is not possible (only with SSL Interception). I think open source software Squid (???) does not support it.

Ok maybe your solution: Link

config/config.php
'proxy' => 'proxy.example.com:3128',

and above all

Note: Guzzle (the http library used by Nextcloud) is reading the environment variables HTTP_PROXY (only for cli request), HTTPS_PROXY, and NO_PROXY by default.

Have you set the environment variables for user www-data?
Maybe you can set it in /etc/environment

How can I set the variables for the www-data user?
→ I have already entered the “proxy line” as described above.

Not tested. Maybe you can set it in /etc/environment or /etc/apache2/envvars

export http_proxy=http://your_ip_proxy:port/
export https_proxy=http://your_ip_proxy:port/

…unfortunately this did not work… Do you have another idea?