Crowdsec cant start with Varnish

Hello everyone, I’ve installed Crowdsec on Ubuntu 20.04 with Apache 2.4 and Varnish. In the Crowdsec configuration file, I have set:

server:
    log_level: info
    listen_uri: 127.0.0.1:8091

Apache2 listening on 127.0.0.1:8080

Varnishd listening on :80

When I try sudo systemctl start crowdsec.service, it doesn’t start the service, and I receive this error:

● crowdsec.service - Crowdsec agent
     Loaded: loaded (/lib/systemd/system/crowdsec.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Sun 2023-11-26 15:53:53 UTC; 29s ago
    Process: 33133 ExecStartPre=/usr/bin/crowdsec -c /etc/crowdsec/config.yaml -t -error (code=exited, status=0/SUCCESS)
    Process: 33160 ExecStart=/usr/bin/crowdsec -c /etc/crowdsec/config.yaml (code=exited, status=1/FAILURE)
   Main PID: 33160 (code=exited, status=1/FAILURE)

Nov 26 15:53:53 xxxxxx systemd[1]: crowdsec.service: Main process exited, code=exited, status=1/FAILURE
Nov 26 15:53:53 xxxxxx systemd[1]: crowdsec.service: Failed with result 'exit-code'.

If I stop Varnish, the service starts.

For example, if I try: sudo cscli alerts list, I get the following error:

FATA[26-11-2023 15:45:32] unable to list alerts: performing request: Get "http://127.0.0.1:8080/v1/alerts?include_capi=false&limit=50": http code 404, invalid body: invalid character '<' looking for beginning of value

sudo journalctl -u crowdsec
Nov 26 15:46:09 xxxxxxxx systemd[1]: Starting Crowdsec agent...
Nov 26 15:46:14 xxxxxxxx systemd[1]: Started Crowdsec agent.
Nov 26 15:46:14 xxxxxxxx crowdsec[29785]: time="26-11-2023 15:46:14" level=fatal msg="starting outputs error : authenticate watcher (c8c7e607a14b5f09c5xxxxxxxxba61d40YzLCcPmOGsiet2d): http code 404, invalid body>
Nov 26 15:46:14 xxxxxxxx  systemd[1]: crowdsec.service: Main process exited, code=exited, status=1/FAILURE
Nov 26 15:46:14 xxxxxxxx systemd[1]: crowdsec.service: Failed with result 'exit-code'.

Disregard what I wrote above, all the listening ports are correct. The only mistake for me was not changing the port in the local_api_credentials.yaml file. The port needed to be changed here as well:

url: http://127.0.0.1:8080 to url: http://127.0.0.1:8091

Now the service activates without any problems