Https share link

When using an https connection, can the share link generated be https and not http?

Hi,

It actually does. No matter if I look at the internal File-Link or the publicly shared link; they all are with https://

I guess there is a misconfiguration.
If you need assistance with finding out the root cause, you could post your config.php (I just guess the reason may lay there), but please make sure to remove/ hide all sensitive information like passwords, real domain and so on.

Thanks for the quick response. Iā€™ve pasted my config.php file below, although canā€™t see anything missing?

<?php
$CONFIG = array (
'instanceid' => 'xxx',
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'trusted_domains' =>
 array (
  0 => 'JAIL_IP',
  1 => 'nextcloud.domain.com',
 ),
'trusted_proxies' =>
 array (
  0 => 'PROXY_IP',
 ),
'datadirectory' => '/mnt/files',
'overwrite.cli.url' => 'https://nextcloud.domain.com',
'dbtype' => 'mysql',
'version' => '13.0.4.0',
'dbname' => 'nextcloud',
'dbhost' => 'localhost:/tmp/mysql.sock',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'user',
'dbpassword' => 'pass',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
  'host' => 'localhost',
  'port' => 6379,
),
'loglevel' => 2,
'mail_smtpmode' => 'smtp',
'mail_from_address' => 'xxx',
'mail_domain' => 'domain.com',
'mail_smtphost' => 'mail.domain.com',
'mail_smtpport' => '26',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtpname' => 'xxx@domain.com',
'mail_smtppassword' => 'xxx',
'maintenance' => false,
'enable_previews' => true,
'theme' => '',
);

looks more as a apache2 missconfiguration on vhost level or bad httaccess

Thanks, but Iā€™m running NGINX so I donā€™t think it can be an apache2 issue. Iā€™ll take a look at the nginx.conf files thoughā€¦

Hi,

Did you find anything in your web server config? While your config.php looks good indeed, I also believe, there must be something wrong with the web server configuration.

I did have a quick look, and I suspect itā€™s down to the way Iā€™m accessing my Nextcloud instance through a reverse-proxy. The reverse-proxy is handling the SSL authentication and Iā€™m forwarding to Nextcloud using http.

I can probably duplicate the SSL on Nextcloud, although it would be a nice option if the share links could be configured as https even if the server isnā€™t?

Same behavior here, my NC instance is also running on Nginx. Have you got a solution, @adrianwi?

Yeah, I edit the link before sending it on to anyone :wink:

Well, itā€™s even more tweaky, @adrianwi : In W10 Explorer, as with OSX Finder, a http link is generated. If you then check the corresponding share link entry directly within Nextcloud, you will see that https is registered thereā€¦ Obviously somethingā€™s wrong. Iā€™m going to do a review of the Nginx configuration this weekend, because I feel like that might be the root cause of the problem. Letā€™s seeā€¦

Tx for the fast reply, @adrianwi, I already tried it before, but it is still downloading via httpā€¦ Does editing the link (not only the text for sure) really work for you? :thinking:

To be fair, my reverse-proxy forwards the http link to https anyway so the connection is secure, but I think it looks more professional if the link has a https address, so tend to just add the ā€˜sā€™ when I remember!

Actually, in testing that Iā€™ve just noticed something strange. If I create the share link in a browser, the link is https. Itā€™s only when I create the link in Finder (MacOS) using the Share with Nextcloud right-click that I get a http link, and the app is connecting via https.

I think it is a genuine bug that the app isnā€™t picking up the connection protocol?

I have exactly the same problem. Has anyone found a solution?