HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   SSL Only site (disable HTTP access) (http://www.howtoforge.com/forums/showthread.php?t=5509)

letic 13th July 2006 16:49

SSL Only site (disable HTTP access)
 
Hi there,

I was wondering is there was a way to modify ISPConfig site configuration to allow only SSL access.

I configured SSL with no problem but I would like to disable access on the port 80 for this particular site.

At the moment I use iptables rules to do this but I just wanted to know if there was an easy way to do it in ISPConfig

Thanks in advance
LeTic

djtremors 14th July 2006 03:29

No 100% solution but you can setup a small php header to redirect them on immediate browse.. ie.

PHP Code:

<?php

header
("Location: https://yoursite.com");

?>


falko 14th July 2006 12:57

Have a look here: http://www-1.ibm.com/support/docview...id=swg21114864
http://www.whoopis.com/howtos/apache-rewrite.html

letic 20th July 2006 13:17

Sorry lads I didn't see your answers before but the subscribtion option in the forum are set to not subscribe to the post you start or answer by default.

Thanks both solution you gave are working fine but I went for Falko's

I knew about the Rewrite Engine but only used it in the .htaccess to change destination I didn't know you could use it with the port and so have the redirect, shame on me :(

Thanks Falko for the answer and if it can be of any help to somenone else I added these rules :
Code:

RewriteEngine on
RewriteCond %{SERVER_PORT} =80
RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI}

To the Apache directives in ISP config.

Thanks for the answers :)


All times are GMT +2. The time now is 16:47.

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