Unable to access rest of web server sites/files without being redirected back to nextcloud (Pi4 Nextcloud SD image)

Nextcloud version: 24.0.3.2
Debian (Pi 4): 11' Apache or nginx version: 2.4.54PHP version:7.4.30`

The issue you are facing:

I’m trying to host two sites on the webserver but whenever I try to go to ‘192.168.0.44/Piwigo’ I’m always redirected to the Nextcloud login page

This is a Raspberry Pi 4 install from the SD card Nextcloud image.

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

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

<?php
$CONFIG = array (
  
  'trusted_domains' => 
  array (
    0 => 'localhost',
    7 => 'nextcloudpi',
    5 => 'nextcloudpi.local',
    8 => 'nextcloudpi.lan',
    3 => '',
    11 => 'PUBLIC IP',
    1 => '192.168.0.44',
    14 => 'tobleronepi',
    2 => '',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '24.0.3.2',
  'overwrite.cli.url' => '/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'ncadmin',
  'dbpassword' => 'eMLOmgqVx8ytsIvcG3C3BVRL4Mgnqeegnh0RDRnuEu0=',
  'installed' => true,
  'instanceid' => 'ocrwsfennhpg',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
    'password' => 
  ),
  'tempdirectory' => '/var/www/nextcloud/data/tmp',
  'mail_smtpmode' => 'sendmail',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_from_address' => 'admin',
  'mail_domain' => 'ownyourbits.com',
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'overwriteprotocol' => 'https',
  'trusted_proxies' => 
  array (

    12 => '::1',
    13 => '',
    14 => '192.168.0.44',
  ),
  'htaccess.RewriteBase' => '/',
);

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

Jan 28 03:15:04 nextcloudpi systemd-modules-load[149]: Inserted module 'aes_neon_bs'
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting Flush Journal to Persistent Storage...
Jan 28 03:15:04 nextcloudpi fake-hwclock[143]: Fri 28 Jan 03:15:01 UTC 2022
Jan 28 03:15:04 nextcloudpi systemd-fsck[166]: e2fsck 1.46.2 (28-Feb-2021)
Jan 28 03:15:04 nextcloudpi systemd-fsck[166]: rootfs: clean, 76933/242880 files, 575984/982016 blocks
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished Set the console keyboard layout.
Jan 28 03:15:04 nextcloudpi systemd-sysusers[181]: Creating group systemd-coredump with gid 996.
Jan 28 03:15:04 nextcloudpi systemd-random-seed[180]: Kernel entropy pool is not initialized yet, waiting until it is.
Jan 28 03:15:04 nextcloudpi systemd-sysusers[181]: Creating user systemd-coredump (systemd Core Dumper) with uid 996 and gid 996.
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished Coldplug All udev Devices.
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting Helper to synchronize boot up for ifupdown...
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished Helper to synchronize boot up for ifupdown.
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished Flush Journal to Persistent Storage.
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished Create System Users.
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting Create Static Device Nodes in /dev...
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished Create Static Device Nodes in /dev.
Jan 28 03:15:04 nextcloudpi systemd[1]: Reached target Local File Systems (Pre).
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting Rule-based Manager for Device Events and Files...
Jan 28 03:15:04 nextcloudpi systemd[1]: Started Rule-based Manager for Device Events and Files.
Jan 28 03:15:04 nextcloudpi systemd-udevd[190]: Using default interface naming scheme 'v247'.
Jan 28 03:15:04 nextcloudpi systemd[1]: Found device /dev/disk/by-partuuid/34b0abbe-01.
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting File System Check on /dev/disk/by-partuuid/34b0abbe-01...
Jan 28 03:15:04 nextcloudpi mtp-probe: checking bus 2, device 2: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-2"
Jan 28 03:15:04 nextcloudpi mtp-probe: bus: 2, device: 2 was not an MTP device
Jan 28 03:15:04 nextcloudpi systemd-fsck[233]: fsck.fat 4.2 (2021-01-31)
Jan 28 03:15:04 nextcloudpi systemd-fsck[233]: /dev/mmcblk0p1: 285 files, 61039/516190 clusters
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished File System Check on /dev/disk/by-partuuid/34b0abbe-01.
Jan 28 03:15:04 nextcloudpi systemd[1]: Mounting /boot...
Jan 28 03:15:04 nextcloudpi systemd[1]: Mounted /boot.
Jan 28 03:15:04 nextcloudpi systemd[1]: Reached target Local File Systems.
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting Set console font and keymap...
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting Raise network interfaces...
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting Preprocess NFS configuration...
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting Create Volatile Files and Directories...
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished Set console font and keymap.
Jan 28 03:15:04 nextcloudpi systemd[1]: nfs-config.service: Succeeded.
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished Preprocess NFS configuration.
Jan 28 03:15:04 nextcloudpi systemd[1]: Condition check resulted in RPC security service for NFS client and server being skipped.
Jan 28 03:15:04 nextcloudpi systemd[1]: Condition check resulted in RPC security service for NFS server being skipped.
Jan 28 03:15:04 nextcloudpi systemd[1]: Reached target NFS client services.
Jan 28 03:15:04 nextcloudpi systemd[1]: Reached target Remote File Systems (Pre).
Jan 28 03:15:04 nextcloudpi systemd[1]: Reached target Remote File Systems.
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished Create Volatile Files and Directories.
Jan 28 03:15:04 nextcloudpi systemd[1]: Started Entropy Daemon based on the HAVEGE algorithm.
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting Network Time Synchronization...
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting Update UTMP about System Boot/Shutdown...
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished Load/Save Random Seed.
Jan 28 03:15:04 nextcloudpi systemd[1]: Finished Update UTMP about System Boot/Shutdown.
Jan 28 03:15:04 nextcloudpi systemd[1]: Condition check resulted in First Boot Complete being skipped.
Jan 28 03:15:04 nextcloudpi systemd[1]: Condition check resulted in Store a System Token in an EFI Variable being skipped.
Jan 28 03:15:04 nextcloudpi systemd[1]: Starting Commit a transient machine-id on disk...

Any help would be appreciated :slight_smile:

Do you mean the NextcloudPi image?

The image doesn’t support hosting 2 sites out-of-the box, you would have to configure Apache2 for multiple sites, to be able to use multiple sites on the same device and webserver, or setup and use a reverse proxy for each of your sites. I don’t know, is the second website a static one?

If so you could try and use the Pico CMS app that helps you accomplish this

Yes, the NCP image.

Ah, I might try and remove the config files for the domain directing with Apache and try restarting the service.

I don’t think it was static ended up making my own static site in place of it so I might as well try and disable it

Definitely give that Pico CMS a go though!

Appreciate the response :slight_smile:

1 Like