문제

I followed this tutorial on how to create owncloud on my server using SSL. The problem I'm having is that I would like to redirect any http requests to https. I'm know that my Document root for http is located in /var/www but not sure where the https one is located. I'm assuming that I have to edit or create a virtual host config that redirects to https. I do not know exactly where to create this configuration setting. In /etc/apache2/sites-enabled/000-defualt ?

I also found you can do this using mod-rewrite but I cannot seem to find my htaccess or httpd.conf files. Is this because I installed apache using Debian?

올바른 솔루션이 없습니다

다른 팁

You can put this inside of the 000-default file you have and it will redirect you to the secure version of your site. Replace example.com with your domain name.

<VirtualHost *:80>
    ServerName example.com
    RedirectPermanent / https://example.com/
</VirtualHost>

It looks like you already have a virtual host for SSL from the tutorial so this should be all you need. Hope this helps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top