#1  
Old 3rd February 2012, 17:02
maxxer maxxer is offline
Junior Member
 
Join Date: May 2007
Posts: 29
Thanks: 5
Thanked 1 Time in 1 Post
Default LEMP + PhpMyAdmin + SSL

Hi.

Any idea on how to configure phpmyadmin on https?

I followed the relative howto, configuring the ssl site as following:
Code:
server {
        listen 443 default_server ssl;
        server_name _;

        ssl_certificate ssl.crt;
        ssl_certificate_key ssl.key;

        ssl_session_timeout 5m;
	keepalive_timeout    70;

        ssl_protocols SSLv3 TLSv1;
        ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
        ssl_prefer_server_ciphers on;
        root /dati/www/management_site;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to index.html
                try_files $uri $uri/ /index.html;
        	index index.php index.html;
            root /dati/www/management_site;
        }

    ## Images and static content is treated different
    location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
        access_log        off;
        expires           30d;
        root /dati/www/management_site;
    }

    ## Parse all .php file in the /var/www directory
    location ~ .php$ {
        fastcgi_split_path_info ^(.+\.php)(.*)$;
        fastcgi_pass   backend;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include fastcgi_params; 
        fastcgi_intercept_errors        on;
        fastcgi_ignore_client_abort     off;
        fastcgi_connect_timeout 60;
        fastcgi_send_timeout 180;
        fastcgi_read_timeout 180;
        fastcgi_buffer_size 128k;
        fastcgi_buffers 4 256k;
        fastcgi_busy_buffers_size 256k;
        fastcgi_temp_file_write_size 256k;
        include /etc/nginx/fastcgi_params;
    }   

        location ~ /\.ht {
                deny all;
        }

        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass 127.0.0.1:9000;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       include /etc/nginx/fastcgi_params;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }

}
I reach the login page, but when I press "login" nginx says that an http request was performed on an https port.
any idea how to fix?
thanks
Reply With Quote
Sponsored Links
  #2  
Old 4th February 2012, 11:15
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Take a look here: http://www.howtoforge.com/running-ph...e-ubuntu-11.04
__________________
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 4th February 2012, 11:45
maxxer maxxer is offline
Junior Member
 
Join Date: May 2007
Posts: 29
Thanks: 5
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by falko View Post
thanks, but the PMA part is pretty identical.
still when I login I get redirected to the http site instead of the https.
If I visit the https site back I result logged in, so probably the cookie is set correctly.
Reply With Quote
  #4  
Old 5th February 2012, 12:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Quote:
Originally Posted by maxxer View Post
thanks, but the PMA part is pretty identical.
No, it isn't. You are missing the
Code:
fastcgi_param HTTPS on;
line.
__________________
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
  #5  
Old 6th February 2012, 08:37
maxxer maxxer is offline
Junior Member
 
Join Date: May 2007
Posts: 29
Thanks: 5
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by falko View Post
No, it isn't. You are missing the
Code:
fastcgi_param HTTPS on;
line.
oh ****, thanks for pointing that out!
sadly it still behaves the same.
can it be due to nginx caching?

thanks
Reply With Quote
  #6  
Old 7th February 2012, 12:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Can you clear your browser's cache?
__________________
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
The Following User Says Thank You to falko For This Useful Post:
maxxer (7th February 2012)
  #7  
Old 7th February 2012, 13:49
maxxer maxxer is offline
Junior Member
 
Join Date: May 2007
Posts: 29
Thanks: 5
Thanked 1 Time in 1 Post
 
Default

now works, thank you very much!
Reply With Quote
Reply

Bookmarks

Tags
nginx, phpmyadmin, ssl

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
haproxy with stunnel problem abubin Server Operation 6 10th April 2012 15:08
Need help with ISPConfig 3 Update midcarolina Installation/Configuration 36 8th November 2011 22:07
Adding SSL certificate to Site snowfly Installation/Configuration 2 31st May 2011 12:54
ssl on phpmyadmin rick z Installation/Configuration 9 22nd October 2010 12:12
SSL for virtual hosts on one certificate rbartz Tips/Tricks/Mods 8 20th November 2007 17:59


All times are GMT +2. The time now is 23:38.


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