Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to get NextCloud Working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
rsnfunky
Tux's lil' helper
Tux's lil' helper


Joined: 30 Dec 2007
Posts: 100

PostPosted: Sat Jan 11, 2025 10:35 am    Post subject: Unable to get NextCloud Working Reply with quote

I insatlled nextcloud using the following WIki: https://wiki.gentoo.org/wiki/Nextcloud#Configuration

Have installed 1) Nextcloud, 2) PHP, 3) apache2

When I go to http://localhost/nextcloud/ it just displays the Php page

If I go to https://localhost/nextcloud/ it displays "You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe"
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3939

PostPosted: Tue Jan 14, 2025 1:09 am    Post subject: Reply with quote

I have found after experimentation an easy way for the whole lamp to work for nextcloud is to have
Code:

listen.owner = nobody
listen.group = nobody
listen.mode = 0666
listen = /var/run/php-fpm/www.sock


in /etc/php/fpm-php*/php-fpm.conf
Make sure php-fpm is running.
Then i do something like
Code:

chown -R nobody:nobody  /var/www/localhost/htdocs/<nextcloud>

In /etc/conf.d/apache2 make sure you have something like
Code:

APACHE2_OPTS="-D SSL -D DEFAULT_VHOST -D SSL_DEFAULT_VHOST -D LANGUAGE  -D PHP -D PROXY"

Make sure that the mysql db for nextcloud exists and is accessible by the user assigned to it and that its running.
I know my setting is extremely insecure and maybe i could toughen up a lot the perms of the nextcloud webdir and the fpm socket but I remember i had really hard time to make it work.
Plz post your
Code:

/etc/apache2/vhosts.d/<nextcloud>.conf
and
/etc/apache2/modules.d/70_mod_php.conf
and
ls /path/to/nextcloud


It should be something like this
Code:

<IfDefine PHP>
        <FilesMatch "\.php$">
                SetHandler "proxy:unix:/var/run/php-fpm/www.sock|fcgi://localhost"
        </FilesMatch>

   <IfModule mod_mime.c>
      AddHandler application/x-httpd-php .php .php5 .php7 .phtml
      AddHandler application/x-httpd-php-source .phps
   </IfModule>
 
   DirectoryIndex index.php index.phtml

   Include "/var/lib/eselect-php/mod_php.conf" 

</IfDefine>


and
Code:

#...........some content
<Directory /var/www/localhost/htdocs/nextcloud>

        Options FollowSymLinks Multiviews
        AllowOverride all ### I think you need this for .htaccess
        Require all granted

   <IfModule mod_dav.c>
            Dav off
          </IfModule>

</Directory>
#......more content

BUT i didnt use webapp to install it.I did so manually.
Hope you will resolve your problem..
Is your
<nextcloud>/config/config.php
properly populated?
_________________
:)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum