Project

General

Profile

Actions

Adjust ownership and permissions

To fix the "Login Page Redirect Loop" issue for your NextCloud website running on Apache with PHP 8, you need to adjust ownership and permissions for certain directories. Why it works:

Web Server Access: NextCloud is a web application that runs on a web server, such as Apache or Nginx. These web servers often run under a specific user and group (e.g., www-data for Apache on many Linux distributions). When the ownership of the NextCloud files and directories is not correctly set to match the web server's user and group, it can lead to access issues. By setting the ownership to match the web server user and group (e.g., www-data:www-data), you ensure that the web server can access and serve the NextCloud files properly.

Change Ownership for NextCloud Directory:

sudo chown www-data:www-data /var/www/html/nextcloud/ -R

Restart Apache:

sudo systemctl restart apache2

Updated by Gareth Eaton 8 months ago · 2 revisions