Help: can't access OwnCloud from outside private network

Hi all.

I just set up an OwnCloud server on my raspberry pi last night. It is currently running perfectly fine, but is only accessible from within my local network.
I've set up port-forwarding on ports 80, 8000, 8080 (for good measure) as well as 443.

The particularly strange thing is that I can access my server (from within my network) via both the ip of my pi as well as my public ip.

I think the issue may lie somewhere within the realm of configuring HTTPS correctly. Any advice is much appreciated.


Raspberry pi 3b
OwnCloud v. 9.0.2
Nginx 1.6.2

I followed this tutorial.

I'll do my best to reply promptly if you have any more questions about my environment. Thank you everyone.

Did you set up your ssl ?

This might help

Can you establish a public IP connection over HTTP?

If you can't do that then you're certainly not going to be able to setup a HTTPS - SSL connection.

I did set up ssl by:

    sudo openssl req $@ -new -x509 -days 730 -nodes -out /etc/nginx/cert.pem -keyout /etc/nginx/cert.key

and then both:

sudo chmod 600 /etc/nginx/cert.pem
sudo chmod 600 /etc/nginx/cert.key

This is precisely the only way I can currently access my server__

This is what i did following the admin instructions

Using info from site above re enabling ssl, i performed the following to enable SSL using a default token. Better is to buy one!

sudo a2enmod ssl
sudo a2ensite default-ssl
sudo service apache2 reload

I was still able to enter site using

file .htaccess is in /var/www/owncloud ... to be modified as shown in the following:

check that the module mod_headers extension is enabled in apache by using the command sudo apache2ctl -M | sort

If it does not appear, then enable it

sudo a2enmod headers

Then restart apache

sudo service apache2 restart

( To disable module use the command sudo a2dismod headers )

Then check again! sudo apache2ctl -M | sort --- > headers_module should appear in the list

I amended .htaccess in /var/www/owncloud and saved as instructed by inserting the code:

Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"

I opened port 443 in the router for my web server.

Then it worked!