Bonjour,
I would like to install a nextcloud server and I am seraching the detailed apache configuration related to this installation on fedora 38.
I could find such a description for ubuntu but the apache configuration is different with this distrib.
Thank you.
On 8/25/23 10:44, François Patte wrote:
I would like to install a nextcloud server and I am seraching the detailed apache configuration related to this installation on fedora 38.
I could find such a description for ubuntu but the apache configuration is different with this distrib.
I have been running nextcloud on two different servers for a long time so I don't remember all the details required to set it up. It has been very stable since then. I think I'm mostly using the default apache config with adjustments to match my hostname. Also, an ssl config to have it work with letsencrypt, probably mostly the one provided by letsencrypt. I have a symlink: /var/www/nextcloud -> /var/lib/nextcloud and I expect that I had to add an selinux fcontext for that target directory. (I don't know off-hand why that symlink is necessary, but I tried removing it and changing the configs and apache rejected it.) I have nextcloud configured to use a particular data directory and I assume that has an fcontext as well.
Le 2023-08-26 06:27, Samuel Sieb a écrit :
On 8/25/23 10:44, François Patte wrote:
I would like to install a nextcloud server and I am seraching the detailed apache configuration related to this installation on fedora 38.
I could find such a description for ubuntu but the apache configuration is different with this distrib.
I have been running nextcloud on two different servers for a long time so I don't remember all the details required to set it up. It has been very stable since then. I think I'm mostly using the default apache config with adjustments to match my hostname. Also, an ssl config to have it work with letsencrypt, probably mostly the one provided by letsencrypt. I have a symlink: /var/www/nextcloud -> /var/lib/nextcloud and I expect that I had to add an selinux fcontext for that target directory. (I don't know off-hand why that symlink is necessary, but I tried removing it and changing the configs and apache rejected it.) I have nextcloud configured to use a particular data directory and I assume that has an fcontext as well.
Thank you for this answer. I, at last, succeeded to install nextcloud (I could downgrade the php version, using remi repos) but I have some config problems and cannot find consistent help with fedora installation.
For instance with selinux nextcloud help gives: <quote> semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.user.ini' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs(/.*)?' # restorecon -Rv '/var/www/html/nextcloud/' </quote>
These files or directories do not exist, apps and data excepted which are located in /var/www/nextcloud.
As it is now configured, nextcloud does not work with setenforce 1
I have this warning:
PHP configuration option output_buffering must be disabled
without any indication on the responsible php file: output_buffering if Off in /etc/php.ini
I cannot configure the mail server...
etc.
I need some help!
Thank you.
On 8/27/23 10:30, François Patte wrote:
Thank you for this answer. I, at last, succeeded to install nextcloud (I could downgrade the php version, using remi repos) but I have some config problems and cannot find consistent help with fedora installation.
For instance with selinux nextcloud help gives:
<quote> semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.user.ini' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs(/.*)?' # restorecon -Rv '/var/www/html/nextcloud/' </quote>
These files or directories do not exist, apps and data excepted which are located in /var/www/nextcloud.
Where did those instructions come from? You need to adjust those commands to match where the files are on your system.
I have this warning:
PHP configuration option output_buffering must be disabled
without any indication on the responsible php file: output_buffering if Off in /etc/php.ini
I don't know where your apache .conf file for the site came from, but mine has the following section in it: <IfModule mod_php7.c> php_value upload_max_filesize 511M php_value post_max_size 511M php_value memory_limit 512M php_value mbstring.func_overload 0 php_value default_charset 'UTF-8' php_value output_buffering 0 <IfModule mod_env.c> SetEnv htaccessWorking true </IfModule> </IfModule>
There's also a global setting in the /etc/php.ini file which you could override with a file in /etc/php.d.
I cannot configure the mail server...
Which one and what is the problem?
On Sun, 2023-08-27 at 19:30 +0200, François Patte wrote:
For instance with selinux nextcloud help gives:
<quote> semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/.user.ini' semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/3rdparty/aws/aws-sdk-php/src/data/logs(/.*)?' # restorecon -Rv '/var/www/html/nextcloud/' </quote>
These files or directories do not exist, apps and data excepted which are located in /var/www/nextcloud.
Good. You should only have web-serveable files inside /var/www/html, if you had configuration files in there (like that "help" suggests), someone could access them by connecting to your IP address.
And web-serveable files can be placed elsewhere, too, you just have to configure the server for their location, and set the appropriate file permissions and SELinux contexts.