HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Force http to https for the admin panel (http://www.howtoforge.com/forums/showthread.php?t=53823)

GarGamel55 18th August 2011 22:49

Force http to https for the admin panel
 
Hello,

I use SSL to connect to the admin panel, it works well. ---> Https://domain.tld:50443 or https://IP:50443

But if I log into http (without the s), I get a bad request (of course :rolleyes:)

How can I force the connection via SSL, but only for the panel and not the whole website

I can do to phpmyadmin and roundcube, but not for the panel

Thanks

falko 20th August 2011 15:34

Should be possible to do this with mod_rewrite: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

GarGamel55 22nd August 2011 22:17

Yes, I know this

I tried this (in ispconfig.vhost)

Code:

<IfModule mod_rewrite.c>
  <IfModule mod_ssl.c>
    <Location />
      RewriteEngine on
      RewriteCond %{HTTPS} !^on$ [NC]
      RewriteCond %{SERVER_PORT}  ^50443$
      RewriteRule . https://%{HTTP_HOST}:50443%{REQUEST_URI}  [L]
    </Location>
  </IfModule>
</IfModule>

but it doesn't work

An idea ?

falko 23rd August 2011 10:46

Can you try these links?

http://www.whoopis.com/howtos/apache-rewrite.html
http://www.cyberciti.biz/tips/howto-...nnections.html
http://www.besthostratings.com/artic...-htaccess.html


All times are GMT +2. The time now is 00:18.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.