Menu

Http redirect to HTTPS

2015-06-10
2015-06-10
  • Marat Isyanov

    Marat Isyanov - 2015-06-10

    Hello,

    I need redirect http to https. I am using XAPMM configured and running iTop.

    in config-itop.php -- app_root_url' => 'https://x.x.x.x/combodo/'

    my httpd-vhost.conf is:

    <virtualhost *:80="">
    DocumentRoot C:/xampp/htdocs/combodo
    SSLEngine On
    ServerName www.x.x.x.x/combodo
    Redirect "/" "https://www.x.x.x.x/"
    </virtualhost>

    < VirtualHost *:443 >
    SSLEngine on
    SSLCertificateFile "conf/ssl.crt/server.crt"
    SSLCertificateKeyFile "conf/ssl.key/server.key"
    <directory var="" www="" html="" itop="">
    AllowOverride All
    </directory>
    DocumentRoot C:/xampp/htdocs/combodo
    ServerName x.x.x.x/combodo
    < /VirtualHost >

    where x.x.x.x is my itop webpage defined in config-itop

    but when i enter http://x.x.x.x there is no redirection to HTTPS.

    Can anyone help me?

     
  • Marat Isyanov

    Marat Isyanov - 2015-06-10

    If there anything else i have to edit? change?

     
  • dlp

    dlp - 2015-06-10

    Do not enable SSLEngine on your virtualHost on the port 80
    This is how I do my redirect :

    <VirtualHost *:80>
            <IfModule mod_rewrite.c>
                    RewriteEngine on
                    RewriteCond %{SERVER_PORT} !^443$
                    RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [C]
            </IfModule>
    </VirtualHost>
    
     
  • Marat Isyanov

    Marat Isyanov - 2015-06-10

    Thanks. I've just changed settings on kerio control.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.