-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Can't connect Nextcloud to MariaDB with SSL #9509
Comments
Is your DB installed locally? If not, that's not really advisable but anyways, try adding these lines into your config.php
Be forewarned this is just a guess. |
@c0fe No, the MariaDB server is another server. |
Did you check that logging to MySQL from Nextcloud server CLI with the certs works? |
@tcitworld There is nothing at nextcloud.log because the HTTP 500 error comes from apache not from aplication.
It's not works (HTTP 500 error) with:
I dont't get it... Is it PHP 7.2 related thing? |
In the first case, you don't actually set the parameters, so if it actually works, it means you either don't need them (they're already set inside php ?) or that you don't use a TLS connection. |
In my case it not working :( |
Since
It should also work if you completely delete this section. Can you confirm that? |
The instance works without these settings. SSL to the database of course not. |
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
Just ran into this problem on NC 15.0.8 when trying to connect to an Azure Database for MySQL, but it turned out that my path to the The working settings (for me) looked like: <?php
$CONFIG = array (
// ... Multiple lines skipped for brevity + security ...
'dbname' => 'my-db-name',
'dbhost' => 'my-database-instance.mysql.database.azure.com',
'dbport' => '3306',
'dbtableprefix' => '',
'dbuser' => 'my-db-user@my-database-instance',
'dbpassword' => 'my-db-password',
'dbdriveroptions' => array(
PDO::MYSQL_ATTR_SSL_CA => '/etc/ssl/certs/Baltimore_CyberTrust_Root.pem',
),
// ... Multiple lines skipped for brevity + security ...
); Azure requires the instance name suffixed to the end of the username, likely for routing purposes. Other, non-Azure installs likely won't need this part, and will need a different CA file than the one for Baltimore CyberTrust. Baltimore CyberTrust is the root CA for MSFT certs. |
Steps to reproduce
Expected behaviour
Nextcloud should connect to MariaDB with SSL encryption
Actual behaviour
HTTP ERROR 500
Server configuration detail
Operating system: Linux 3.10.0-862.2.3.el7.x86_64 #1 SMP Wed May 9 18:05:47 UTC 2018 x86_64
( CentOS 7.5)
Webserver: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips (apache2handler)
Database: mysql 10.2.14
PHP version: 7.2.5
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, intl, json, ldap, exif, mysqlnd, PDO, Phar, posix, shmop, SimpleXML, sockets, sqlite3, sysvmsg, sysvsem, sysvshm, tokenizer, xml, xmlwriter, xsl, mysqli, pdo_mysql, pdo_sqlite, wddx, xmlreader, igbinary, zip, redis, Zend OPcache
Nextcloud version: 13.0.2 - 13.0.2.1
**Updated from an older Nextcloud/ownCloud or fresh install: ** Fresh
Where did you install Nextcloud from: official tar.gz
Signing status
Array
List of activated apps
Configuration (config/config.php)
Are you using external storage, if yes which one: No.
Are you using encryption: no
Are you using an external user-backend, if yes which one: No.
Client configuration
Browser: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
Operating system: Windows 10.
Logs
Browser log
Nextcloud log
Browser log
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
The text was updated successfully, but these errors were encountered: