#1  
Old 4th March 2008, 23:32
rick z rick z is offline
Junior Member
 
Join Date: Nov 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default ssl on phpmyadmin

Hi

I have install ubuntu 7.10 server version and install phpmyadmin using "apt-get install phpmyadmin" How could I get it to force redirect using https instead http? I look on the phpmyadmin website, but I didn't see the phpmyadmin file(s) under /var/www. I think on the ubuntu install it is on other directory.

On all my other site under /var/www/mysite I could manully type https://mysite/ without any error.

Please help...

Thanks.
Rickz
Reply With Quote
Sponsored Links
  #2  
Old 5th March 2008, 16:14
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

What's the output of
Code:
ls -la /var/www
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 6th March 2008, 01:45
rick z rick z is offline
Junior Member
 
Join Date: Nov 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is the results. I am wondering if the install "phpmyadimin on ubuntu" is directed to some other place. What command can I use to find out what's been symbolic link to /var/www ?

root@test:~# ls -la /var/www
total 32
drwxr-xr-x 7 root root 4096 2008-03-03 00:17 .
drwxr-xr-x 15 root root 4096 2008-02-14 00:32 ..
drwxr-xr-x 2 root root 4096 2008-02-20 00:10 apache2-default
drwxr-xr-x 2 root root 4096 2008-03-03 00:17 eyeos
-rw-r--r-- 1 root root 44 2008-02-19 22:53 info.php
drwxr-xr-x 16 ftpuser www-data 4096 2008-02-21 21:07 joo
drwxr-xr-x 2 root root 4096 2008-02-28 17:37 ko
drwxr-xr-x 2 root root 4096 2008-03-02 06:25 webalizer
Reply With Quote
  #4  
Old 6th March 2008, 08:19
thecaoticone thecaoticone is offline
Member
 
Join Date: Nov 2007
Posts: 89
Thanks: 1
Thanked 18 Times in 16 Posts
Default

If you are using a straight Apache configuration ( not ISP ) you can add a rewrite in your site conf file.

If you are using the default conf, add this to your /etc/apache2/sites-available/default

<IfModule mod_rewrite.c>
<IfModule mod_ssl.c>
<Location /phpmyadmin>
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://mysite.com/phpmyadmin [R]
</Location>
</IfModule>
</IfModule>


Then restart Apache.

Last edited by thecaoticone; 6th March 2008 at 08:22.
Reply With Quote
  #5  
Old 6th March 2008, 15:25
rick z rick z is offline
Junior Member
 
Join Date: Nov 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Thank you for the suggestion!!!

Hi thecaoticone,

Thank you for the quick tip. I will give that a try tonight.

So for the installation using 'apt-get install phpmyadmin' it has to be done at the /etc/apache2/sites-available/default directory but not the phpmyadmin directory. You know,... I was going around the phpmyadmin's website & goolging and couldn't find this simple step that you are providing... In the phpmyadmin's website I found something like "$cfg['ForceSSL'] boolean - Whether to force using https while accessing phpMyAdmin" But I couldn’t find the configuration files. Any how… Thank you!
Reply With Quote
  #6  
Old 7th March 2008, 03:04
rick z rick z is offline
Junior Member
 
Join Date: Nov 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The http://mysite/myphpadmin did not get redirect to https after input the following code.

<IfModule mod_rewrite.c>
<IfModule mod_ssl.c>
<Location /phpmyadmin>
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://mysite.com/phpmyadmin [R]
</Location>
</IfModule>
</IfModule>


Any suggestion?
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
Apache2 and multiple SSL configs and name based virtual hosting Creator1326 Server Operation 11 5th October 2010 19:28
Setting up a customer SSL site catdude General 3 24th January 2008 18:34
SSL for virtual hosts on one certificate rbartz Tips/Tricks/Mods 8 20th November 2007 17:59
SSL Issue - Unable to connect to any site Menzor Installation/Configuration 4 27th May 2007 04:03
Unbearably slow access speeds CombatGod Installation/Configuration 5 30th May 2006 16:31


All times are GMT +2. The time now is 02:03.


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