Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test and confirm installation on FreeNAS 11.3 requires mod_rewrite #2

Closed
samuel-emrys opened this issue Apr 26, 2020 · 0 comments
Closed
Assignees

Comments

@samuel-emrys
Copy link
Contributor

Based on the comments of Stephen David:

I followed all the steps above in Freenas 11.3, with nextcloud-7.2. Once everything is setup, i could not log in using the webapp. This gives a 401 error when trying to grant access.

The apache server configuration was missing modwrite in other to pass the authentication through for the webdav basic auth. as per link: https://help.nextcloud.com/t/client-login-fails-with-401/29378/7

steps required:
nano /usr/local/etc/apache24/httpd.conf
find rewrite_module and uncomment the line: LoadModule rewrite_module libexec/apache24/mod_rewrite.so

return to modify your virtual host file
cd /usr/local/etc/apache24/Includes
Add the following lines into the virtual hosts, it should look something like this (note, i’ve changed my php-fpm to use a socket):

<VirtualHost *:80>
DocumentRoot "/usr/local/www/nextcloud"
ServerName IP
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php-fpm.sock|fcgi://localhost/"
</FilesMatch>
DirectoryIndex /index.php index.php

RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
</VirtualHost>

Boom, the web-app should work and you’ll be able to log in from the application. From reading over the comment thread, the basic authentication is not being passed through, leading to a 401 error.
@samuel-emrys samuel-emrys self-assigned this Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant