Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 29th July 2009, 09:09
masterx masterx is offline
Junior Member
 
Join Date: Jul 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTTP trafic to HTTPS, cant get it to work

I read that i can use mod_Rewrite... But im a newbie at PHP coding, so i don't know where to put it. I read that it should be in this file: /etc/apache2/sites-available/ispconfig.vhost.... But where in this file?

The file looks like this:

################################################## ####
# This virtual host contains the configuration
# for the ISPConfig controlpanel
################################################## ####

Listen 8080
NameVirtualHost *:8080

<VirtualHost _default_:8080>
ServerAdmin webmaster@localhost

<IfModule mod_fcgid.c>
DocumentRoot /var/www/ispconfig/
SuexecUserGroup ispconfig ispconfig
<Directory /var/www/ispconfig/>
Options Indexes FollowSymLinks MultiViews +ExecCGI
AllowOverride AuthConfig Indexes Limit Options FileInfo
AddHandler fcgid-script .php
FCGIWrapper /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter .php

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

Order allow,deny
Allow from all
</Directory>
</IfModule>

<IfModule mod_php5.c>
DocumentRoot /usr/local/ispconfig/interface/web/
AddType application/x-httpd-php .php
<Directory /usr/local/ispconfig/interface/web>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
php_value magic_quotes_gpc 0
</Directory>
</IfModule>

<IfModule mod_ssl.c>
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/server.crt
SSLCertificateKeyFile /etc/apache2/ssl/server.key
</IfModule>

# ErrorLog /var/log/apache2/error.log
# CustomLog /var/log/apache2/access.log combined
ServerSignature Off
</VirtualHost>

<Directory /var/www/php-cgi-scripts>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<Directory /var/www/php-fcgi-scripts>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

But it still not works, anyone who can edit the file above, so it would work?

Thanks in advance
Reply With Quote
Sponsored Links
  #2  
Old 29th July 2009, 12:18
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,702
Thanks: 819
Thanked 5,319 Times in 4,172 Posts
Default

What exactly do you want to do? This vhost is for the admin control panel on port 8080 only. As the admin controlpanel runs by default only without https, you can not redirect it to https as there is nothing to redirect it to. If you want to enable https for port 8080, take a look here:

http://www.howtoforge.com/forums/showthread.php?t=27754
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 29th July 2009, 16:00
masterx masterx is offline
Junior Member
 
Join Date: Jul 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the reply...

I got SSL working before, so thats ok... But when typing http://SERVER:8080, then a message appears with a link to https://SERVER:8080.

What i want, is when you type http://SERVER:8080, you should be automatically redirected to https://SERVER:8080....

Do you know what i mean now?

Thanks in advance...
Reply With Quote
  #4  
Old 3rd August 2009, 17:04
masterx masterx is offline
Junior Member
 
Join Date: Jul 2009
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Bump Bump...
Reply With Quote
  #5  
Old 4th August 2009, 11:47
radim_h radim_h is offline
Senior Member
 
Join Date: Jan 2007
Location: Prague, Czech
Posts: 419
Thanks: 33
Thanked 24 Times in 19 Posts
Send a message via ICQ to radim_h
 
Default why not use default https port 443 ?

Hello bumper .o)

why not use ssl VirtualHost ?

modify /etc/apache2/ports to looks like

NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
NameVirtualHost 123.456.789.012:443 (put your IP here)
Listen 443
</IfModule>


then you modify /etc/apache2/sites-enabled/default-ssl as:

<IfModule mod_ssl.c>
#<VirtualHost _default_:443>
#NameVirtualHost 123.456.789.012:443
<VirtualHost 123.456.789.012:443> (put your IP here)

then in /etc/apache2/sites-available create file as
ispconfig.vhost.ssl
(otherwise your .conf will be modified after ISPC update, correct me if i'm wrong..)

and include original ISPC config vhost into this file, you can also redirect http for ISPC:

<VirtualHost 123.456.789.012:80>
ServerName ispc.yoursite.tld:80
ServerAdmin webmaster@yoursite.tld
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://ispc.yoursite.tld/$1 [L,R]
</VirtualHost>


<VirtualHost 123.456.789.012:443>
SSLEngine on
SSLCertificateFile /etc/ssl/_.yoursite.tld/_.yoursite.tld.crt
SSLCertificateKeyFile /etc/ssl/_.yoursite.tld/_.yoursite.tld.key
#<VirtualHost _default_:8080>
ServerName ispc.yoursite.tld
ServerAdmin webmaster@yoursite.tld
.
.
.
.
.
.
.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig: from http to https & from https to http Hans Tips/Tricks/Mods 13 12th March 2013 23:22
HTTP POST request over GPRS doesn't work. hiharsh Technical 2 23rd July 2008 16:52
Can ISPConfig listen on http & https? spidie Installation/Configuration 2 31st July 2007 02:53
http redirect to https derfy Feature Requests 2 24th June 2006 21:04
redirect an application (egroupware) from http to https blackflag Installation/Configuration 13 21st February 2006 21:44


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


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