Unable to access nextcloud fresh install

[/details]

Nextcloud version (eg, 29.0.5): Nextcloud AIO v9.7.0
Operating system and version (eg, Ubuntu 24.04): 24.04
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.26.1
PHP version (eg, 8.3): PHP 8.1.2-1ubuntu2.19 on nginx server, not installed on nextcloud server as is only running nextcloud docker aio

The issue you are facing:

this is a fresh install of Nextcloud docker AIO

when i visit the domain ive set for nextcloud i get 400 bad request making it unusable
this is in the nginx access logs
192.168.5.246 - - [28/Oct/2024:02:35:22 +0000] "GET /favicon.ico HTTP/2.0" 400 15 "https://redacted/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"

to get the ip for aio-nextcloud
sudo docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' e0a53bb34c81 172.18.0.12

ran from inside the apache container
73dd99c04105:/usr/local/apache2$ wget -qO- http://localhost:9000 wget: can't connect to remote host: Connection refused 73dd99c04105:/usr/local/apache2$ wget -qO- http://172.18.0.12:9000 wget: error getting response: Connection reset by peer

ran from nginx server nc -z 192.168.70.40 11000; echo $? 0

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

PASTE HERE

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

Connection to nextcloud-aio-nextcloud (172.18.0.12) 9000 port [tcp/*] succeeded!
[Mon Oct 28 02:34:42.919238 2024] [mpm_event:notice] [pid 33:tid 33] AH00489: Apache/2.4.62 (Unix) configured -- resuming normal operations
[Mon Oct 28 02:34:42.919516 2024] [core:notice] [pid 33:tid 33] AH00094: Command line: '/usr/local/apache2/bin/httpd -D FOREGROUND'
{"level":"info","ts":1730082882.9754755,"msg":"using config from file","file":"/tmp/Caddyfile"}
{"level":"info","ts":1730082882.9817705,"msg":"adapted config to JSON","adapter":"caddyfile"}

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

2024-10-28T02:16:08.202188211Z [Mon Oct 28 02:16:08.199186 2024] [proxy_http:error] [pid 277:tid 293] (20014)Internal error (specific information not available): [client 192.168.5.246:62848] AH01102: error reading status line from remote server 127.0.0.1:8000, referer: https://192.168.70.40:8080/containers
2024-10-28T02:19:39.247330470Z NOTICE: PHP message: 404 Not Found
2024-10-28T02:19:39.247423723Z Type: Slim\Exception\HttpNotFoundException
2024-10-28T02:19:39.247458234Z Code: 404
2024-10-28T02:19:39.247492128Z Message: Not found.
2024-10-28T02:19:39.247522782Z File: /var/www/docker-aio/php/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php
2024-10-28T02:19:39.247612294Z Line: 76
2024-10-28T02:19:39.247644905Z Trace: #0 /var/www/docker-aio/php/vendor/slim/slim/Slim/Routing/RouteRunner.php(62): Slim\Middleware\RoutingMiddleware->performRouting(Object(GuzzleHttp\Psr7\ServerRequest))
2024-10-28T02:19:39.247680736Z #1 /var/www/docker-aio/php/vendor/slim/csrf/src/Guard.php(482): Slim\Routing\RouteRunner->handle(Object(GuzzleHttp\Psr7\ServerRequest))
2024-10-28T02:19:39.247715384Z #2 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(177): Slim\Csrf\Guard->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Slim\Routing\RouteRunner))
2024-10-28T02:19:39.247754605Z #3 /var/www/docker-aio/php/vendor/slim/twig-view/src/TwigMiddleware.php(117): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
2024-10-28T02:19:39.247791039Z #4 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(129): Slim\Views\TwigMiddleware->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
2024-10-28T02:19:39.247825084Z #5 /var/www/docker-aio/php/src/Middleware/AuthMiddleware.php(36): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
2024-10-28T02:19:39.247862358Z #6 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(280): AIO\Middleware\AuthMiddleware->__invoke(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
2024-10-28T02:19:39.247903539Z #7 /var/www/docker-aio/php/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(77): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
2024-10-28T02:19:39.247942750Z #8 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(129): Slim\Middleware\ErrorMiddleware->process(Object(GuzzleHttp\Psr7\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
2024-10-28T02:19:39.247982948Z #9 /var/www/docker-aio/php/vendor/slim/slim/Slim/MiddlewareDispatcher.php(73): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(GuzzleHttp\Psr7\ServerRequest))
2024-10-28T02:19:39.248022995Z #10 /var/www/docker-aio/php/vendor/slim/slim/Slim/App.php(209): Slim\MiddlewareDispatcher->handle(Object(GuzzleHttp\Psr7\ServerRequest))
2024-10-28T02:19:39.248089601Z #11 /var/www/docker-aio/php/vendor/slim/slim/Slim/App.php(193): Slim\App->handle(Object(GuzzleHttp\Psr7\ServerRequest))
2024-10-28T02:19:39.248117214Z #12 /var/www/docker-aio/php/public/index.php(186): Slim\App->run()
2024-10-28T02:19:39.248142215Z #13 {main}
2024-10-28T02:19:39.248166843Z Tips: To display error details in HTTP response set "displayErrorDetails" to true in the ErrorHandler constructor.

Hi, do you try to install aio behind a reverse proxy?

Yes, i followed the instructions on GitHub

Okay, can you follow all-in-one/reverse-proxy.md at main · nextcloud/all-in-one · GitHub?

Yes, I’ve tried all the debug steps there

Okay, then what are the results of each step?

Also we can only help you if you post all used configs like the nginx config, the docker config of aio and else

i used the config from the guide, i also put the results of the only command in the debug steps in the initial message

Sorry I dont see the results of the guide that I linked being present in your initial post. Also please post the configs that I requested

Sorry for the late reply had a couple work meetings

ran from nginx server nc -z 192.168.70.40 11000; echo $? 0

nginx config

server {
    listen 80;
    listen [::]:80;            # comment to disable IPv6

    if ($scheme = "http") {
        return 301 https://$host$request_uri;
    }

    #listen 443 ssl http2;      # for nginx versions below v1.25.1
    #listen [::]:443 ssl http2; # for nginx versions below v1.25.1 - comment to disable IPv6

     listen 443 ssl;      # for nginx v1.25.1+
     listen [::]:443 ssl; # for nginx v1.25.1+ - keep comment to disable IPv6

     http2 on;                                 # uncomment to enable HTTP/2        - supported on nginx v1.25.1+
    # http3 on;                                 # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+
    # quic_retry on;                            # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+
    # add_header Alt-Svc 'h3=":443"; ma=86400'; # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+
    # listen 443 quic reuseport;       # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on port 443 with enabled reuseport
    # listen [::]:443 quic reuseport;  # uncomment to enable HTTP/3 / QUIC - supported on nginx v1.25.0+ - please remove "reuseport" if there is already another quic listener on port 443 with enabled reuseport - keep comment to disable IPv6

    server_name cloud.redacted.co.uk;

    location / {
        proxy_pass http://192.168.70.40:11000$request_uri;

        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Port $server_port;
        proxy_set_header X-Forwarded-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Host $host;

        proxy_request_buffering off;
        proxy_read_timeout 86400s;
        client_max_body_size 0;

        # Websocket
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
    }

    # If running nginx on a subdomain (eg. nextcloud.example.com) of a domain that already has an wildcard ssl certificate from certbot on this machine,
    # the <your-nc-domain> in the below lines should be replaced with just the domain (eg. example.com), not the subdomain.
    # In this case the subdomain should already be secured without additional actions
    ssl_certificate /etc/letsencrypt/live/redacted.co.uk/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/redacted.co.uk/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

   # ssl_session_timeout 1d;
   # ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
   # ssl_session_tickets off;

    # ssl_protocols TLSv1.2 TLSv1.3;
    # ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305;
    # ssl_prefer_server_ciphers on;

    # Optional settings:

    # OCSP stapling
    # ssl_stapling on;
    # ssl_stapling_verify on;
    # ssl_trusted_certificate /etc/letsencrypt/live/<your-nc-domain>/chain.pem;

    # replace with the IP address of your resolver
    # resolver 127.0.0.1; # needed for oscp stapling: e.g. use 94.140.15.15 for adguard / 1.1.1.1 for cloudflared or 8.8.8.8 for google - you can use the same nameserver as listed in your /etc/resolv.conf file
}```

nevermind, no idea what went wrong but i just restarted the entire VM instead of the docker containers and now its working

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.