Hello,
I configure nextcloud and everything work fine.
i can log my cloud from the IP and the “*****” domain
After i try to get ssl enable, my subdomain link wont work (cloud.cbtgroup.ml).
nividan@nivsrvubu:~$ service apache2 status
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Mon 2019-12-16 19:32:55 UTC; 2min 34s ago
Process: 4593 ExecStop=/usr/sbin/apachectl stop (code=exited, status=0/SUCCESS)
Process: 4574 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)Dec 16 19:32:55 nivsrvubu systemd[1]: Starting The Apache HTTP Server…
Dec 16 19:32:55 nivsrvubu apachectl[4574]: httpd (pid 4514) already running
Dec 16 19:32:55 nivsrvubu systemd[1]: Started The Apache HTTP Server.
my config file:
<?php
$CONFIG = array (
'instanceid' => '*************',
'passwordsalt' => '*************',
'secret' => '*************',
'trusted_domains' =>
array (
0 => 'localhost',
2 => '***',
3 => '***',
4 => '**.**.***.***(IP)',
),
'datadirectory' => '/var/www/html/nextcloud/data',
'dbtype' => 'mysql',
'version' => '17.0.1.1',
'overwrite.cli.url' => 'https://**.**.***.***(IP)',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => '**********',
'dbpassword' => '*********',
'installed' => true,
'maintenance' => false,
'mail_from_address' => 'yes',
'mail_smtpmode' => 'smtp',
'mail_smtpauthtype' => 'LOGIN',
'mail_sendmailmode' => 'smtp',
'mail_domain' => '**********',
'mail_smtphost' => 'out.bezeqint.net',
'mail_smtpport' => '25',
'mail_smtpauth' => '1',
'mail_smtpname' => '**********',
'mail_smtppassword' => '**********',
'twofactor_enforced' => 'true',
'twofactor_enforced_groups' =>
array (
),
'twofactor_enforced_excluded_groups' =>
array (
0 => 'admin',
1 => 'Users',
),
);
sites-enabled/nextcloud-le-ssl.conf:
DocumentRoot /var/www/html/nextcloud/ ServerName nextcloud<Directory /var/www/html/nextcloud/> Options +FollowSymlinks AllowOverride All Require all granted <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/html/nextcloud SetEnv HTTP_HOME /var/www/html/nextcloud </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
ServerAlias ****
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/****/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/*/privkey.pem
<VirtualHost :80>
ServerAdmin nextcloud@
DocumentRoot /var/www/html/nextcloud/
ServerName nextcloud
ServerAlias ******<Directory /var/www/html/nextcloud/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
Some rewrite rules in this file were disabled on your HTTPS site,
because they have the potential to create redirection loops.
RewriteCond %{SERVER_NAME} =****
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
sites-enabled/nextcloud.conf:
<VirtualHost *:80>
ServerAdmin nextcloud@***
DocumentRoot /var/www/html/nextcloud/
ServerName nextcloud
ServerAlias ******
<Directory /var/www/html/nextcloud/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =c*****
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
If any one can help me and find config error?
everything working fine untill I try to HTTPS my nas