Hi guys, i’ve installed nextcloud on a CentOS machine. It works fine but i cannot configure the https redirect, i’ve tried a lot of configuration but when i try to open the https url it was unaccessible. Here the config.php file and the nextcloud.conf file (in sites-available)
What’s wrong?
$CONFIG = array (
‘instanceid’ => ‘xxxxxxxx’,
‘passwordsalt’ => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
‘secret’ => ‘xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx’,
‘trusted_domains’ =>
array (
0 => ‘test-nextcloud’,
1 => ‘xx.xx.xxx.xxx’,
2 => ‘localhost’,
),
‘datadirectory’ => ‘/var/www/html/nextcloud/data’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘17.0.2.1’,
‘overwrite.cli.url’ => ‘http://xx.xx.xxx.xxx/nextcloud’,
‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘xxxxxxxx’,
‘dbpassword’ => ‘xxxxxxxxx’,
‘installed’ => true,
‘logtimezone’ => ‘Europe/Rome’,
‘logfile’ => ‘/var/www/html/data/nextcloud.log’,
‘twofactor_enforced’ => ‘true’,
‘twofactor_enforced_groups’ =>
array (
0 => ‘User 2FA’,
),
‘twofactor_enforced_excluded_groups’ =>
array (
0 => ‘admin’,
1 => ‘test’,
),
‘mail_from_address’ => ‘Nextcloud’,
‘mail_smtpmode’ => ‘smtp’,
‘mail_sendmailmode’ => ‘smtp’,
‘mail_domain’ => ‘test.it’,
‘maintenance’ => false,
‘mail_smtphost’ => ‘xx.xx.xxx.xx’,
);
nextlcoud.conf :
<VirtuallHost *:80>
ServerAdmin test-admin
Redirect permanent / https://xx.xx.xxx.xxx/
DocumentRoot “/var/www/html/nextcloud”
ServerName test-nextcloud
<Directory “/var/www/html/nextcloud/”>
Options MultiViews FollowSymlinks
AllowOverride All
Order allow,deny
Allow from all
TransferLog /var/log/httpd/nextcloud_access.log
ErrorLog /var/log/httpd/nextcloud_error.log
<VirtualHost *:443>
#SSL
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
SSLProtocol -All +TLSv1.2
#SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384
SSLCipherSuite HIGH:!MEDIUM:!aNULL:!MD5:!RC4
SSLUseStapling on
SSLHonorCipherOrder off
#HTTP/2 if available
<IfModule mod_http2.so>
Protocols h2 http/1.1
</IfModule>
DocumentRoot "/var/www/html/nextcloud"
ServerName test-nextcloud
ErrorLog /var/www/html/nextcloud/error.log
<Directory /var/www/html/nextcloud/>
DirectoryIndex index.html index.php
“/etc/httpd/sites-available/owncloud.conf” 48L, 1481C
Options +FollowSymlinks
AllowOverride All
SetEnv HOME /var/www/html/nextcloud
SetEnv HTTP_HOME /var/www/html/nextcloud
Satisfy Any
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
HELP ME!!