How to disable Owncloud https redirect?

user376244 picture user376244 · Mar 10, 2013 · Viewed 7.9k times · Source

I installed Owncloud on Ubuntu 12.04 with an apache server. I use ssl for authentication but when sharing links and data it is cumbersome for the user to accept the self signed certificate. Is there a way to disable the automatic redirect to https? I did not see any related commands in the .htaccess file. Thanks

Answer

Steve K picture Steve K · Aug 20, 2013

SSL is enforced by the OwnCloud installation routine in your Web server as a rewrite rule. Unchecking the box in the OC FrontEnd won't help. This can be regarded as bug.

To change this, you will have to edit your Web server config. For instance, if you chose nginx as your Web server, uncomment the https rewrite rule in your nginx config file.

Open your config file in an editor:

sudo emacs /etc/nginx/sites-enabled/default

For Apache it should be somewhere in /etc/httpd/conf.d/ssl.conf

Comment out or change the lines containing (this is for nginx):

  • the server block containing the redirect
  • change listen 443 ssl to listen 80
  • ssl_certificate and ssl_certificate_key
  • fastcgi_params HTTPS on

Re-Read the nginx config files:

sudo kill -HUP `cat /var/run/nginx.pid`

For other servers see:

http://doc.owncloud.org/server/5.0/admin_manual/installation/installation_others.html