How do I configure Owncloud ddns https/ssl access?

Status
Not open for further replies.

luckyluke699

Dabbler
Joined
Mar 30, 2016
Messages
18
Hello All,

I would like to get OwnCloud accessible externally, and am after a little help achieving:

- Owncloud diverts all http port 80 requests to https on a high port number (e.g. 8080)
- Owncloud is accessible on local LAN via internal IP (e.g. 192.168.0.10:8080), as well as on web via a DDNS address (e.g. LukesServer.ddns.net:8080)

I am comfortable with how to configure the DDNS and router port forwarding. I would appreciate assistance with learning and understanding how to configure the apache SSL access correctly to achieve the above within the jail if anyone can help :)

My Setup:
Freenas: FreeNAS-9.3-STABLE-201602031011
OwnCloud: Plugin - 9.0
System: HP N54L / 16GB RAM
Apache: Apache24


I copied the following to create SSL certificates within the jail:
http://www.stephen-scotter.net/comp...n-please-double-check-the-installation-guides


I then edited the 'httpd-ssl.conf' to alter the port apache is listening to from 443 to 8080 as it mentioned.

Unfortunately after an apache restart I couldn't acccess the web page (no response to :80, :443 or :8080). Just timing out.

Next I looked at the offical https documentation here, which mentions other.different configuraiton needed?
https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/harden_server.html#use-https


I configured 'httpd-vhosts.conf' as below (I presume this is right?) but still no luck. Just timing out still.

<VirtualHost *:80>
ServerName LukeServer.ddns.net
ServerAlias 192.168.0.10
Redirect permanent / https://192.168.0.10:8080/
</VirtualHost>

<VirtualHost *:8080>
ServerName LukeServer.ddns.net
ServerAlias 192.168.0.10
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
</IfModule>
</VirtualHost>



Can anyone help point me in the right direction? Did I do anything particularly wrong above?

I'm a little too new with Apache/BSD to be able to work out where I'm going wrong so thanks in advance if anyone can help! :D
 
Last edited:

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
The plugin already has https set up by default. I you want to use a different certificate you can just replace it and restart apache.
Other than that I'm not an expert an apache/HTTPS setup, but I bet the owncloud forums would be able to help with anything additional.
 

siteswap

Dabbler
Joined
Oct 12, 2016
Messages
16
Hi Luke , I lost my head to configure https .....but at the end I've done it ..... so
Go to
/usr/pbi/owncloud-amd64/etc/apache24 # nano httpd.conf
and find
# Virtual hosts
#Include etc/apache24/extra/httpd-vhosts.conf
edit this line
# Virtual hosts
Include etc/apache24/extra/httpd-vhosts.conf
and restart apache24
service apache24 restart
you will see these messages

Performing sanity check on apache24 configuration:
AH00112: Warning: DocumentRoot [/usr/pbi/owncloud-amd64/docs/dummy-host.example.com] does not exist
AH00112: Warning: DocumentRoot [/usr/pbi/owncloud-amd64/docs/dummy-host2.example.com] does not exist
Syntax OK

so edit the file
/usr/pbi/owncloud-amd64/etc/apache24/extra # nano httpd-vhosts.conf

SORRY for my poor english ;D
 
Status
Not open for further replies.
Top