My Owncloud works fine using http but I tried to redirect traffic to https and got "HTTP Error 404. The requested resource is not found."
In order to redirect to https I added "Redirect permanent / https://my.server.com/" to the top of /etc/httpd/conf.d/owncloud.conf
Owncloud is installed on CentOS 7.
I spent a lot of time in google trying different solutions but it's not working. What could be the issue?
The redirect has to be entered in your Apache conf. Either sites enabled or available. In the virtual host entry. Here is the page from the docs.
The thing is it's working with http even without any virtual host configured. I'm using a basic config. So, I'm wondering why it's not working when I use the redirection.
Maybe you can find some information about this issue in the Apache documentation?
Thank you. I tried httpd -S but it's not helpful in my case. Concerning virtual hosts, Owncloud works with http even without any configured. So, I'm assuming the issue is not related to that.
I think its fully related to the vhosts and the way you're trying to configure it.
From what i know ownCloud is just a bunch of PHP files which are hosted by your web server. So there is probably something wrong / different in the configuration of http and https. Maybe you're redirecting from http to https but the https vhost is not serving ownCloud at all?