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
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
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.
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!
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?
First off, I told you wrong. The correct file is: /etc/apache2/sites-available/000-default not: /etc/apache2/sites-available/default My apologies for that mistake. You will need to load the rewrite_mod for apache: sudo a2enmod rewrite You also need to change AllowOverride from None to All in the first 2 directory blocks. A better example for this is here: http://www.xpheas.com/mod_rewrite-Apache-and-Ubuntu-Gutsy_a18.html Here is an example of /etc/apache2/sites-available/000-default using a rewrite for phpmyadmin. If you do not use the default conf change to the conf you created for your main site. Just a note, I came across this in the Squirrelmail configuration. Let me know if this helped.
it's working now. I was able to get it re-direct to https with my new install ubuntu last weekend. Thank you so much!!!
May i grab it from deep of the grounds ? (Just in case i ever forget it myself ) Debian/Ubuntu-release of PhpMyAdmin is configured in /etc/apache2/conf.d/phpmyadmin.conf Following forces my clients to use https vHost-independent Hope it helps anybody else too greetz skara