My status

My backup memory

Thứ Bảy, 15 tháng 9, 2012

secure path to phpmyadmin with SSL

Có vài cách để thực hiện việc này:

1. Using phpMyAdmin’s config.inc.php file:
// place this at the bottom somewhere
$cfg['ForceSSL'] = true;

Cách này chưa thử. Có lẽ không được vì sẽ sử dụng port 443 -> xung đột với ứng dụng khác

2. Sử dụng digest authentication thay cho basic authentication
http://ileriseviye.org/blog/sysadmin/security-tip-of-the-day-use-htdigest-instead-of-htpasswd-for-phpmyadmin-and-other-sensitive-stuff/

http://www.googlux.com/basic-digest-auth.html

Nhược điểm là thêm một lần nhập username và password -> bất tiện

3. Redirect
http://www.howtoforge.com/extending-perfect-server-debian-squeeze-ispconfig-3-p3
Edit & append to the end of file phpmyadmin.conf

nano /etc/apache2/conf.d/phpmyadmin.conf

-----------
< IfModule mod_rewrite.c>
  < IfModule mod_ssl.c>
    < Location /mydomaindb>
      RewriteEngine on
      RewriteCond %{HTTPS} !^on$ [NC]
      RewriteRule . https://%{HTTP_HOST}:50443%{REQUEST_URI}  [L]
    < /Location>
  < /IfModule>
< /IfModule>
-----------
Restart Apache
/etc/init.d/apache2 restart

Không có nhận xét nào:

Đăng nhận xét