1

When I open phpmyadmin without encription, everything goes fine. however, if I switch to https, the browser downloads the index file.

apache 000-default.conf as

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
###### I tried with and without the next group: with no luck
<VirtualHost *:443>
    ServerAdmin webmaster@localhost
    ServerName my.server:443
    DocumentRoot /var/www/html
    SSLEngine on
    SSLCertificateFile  /etc/ssl/certs/ssl-cert-snakeoil.pem
    SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

my apache.conf is de default one (installed by phpmyadmin) - the part that concerns goes here: Alias /phpyadmin /usr/share/phpmyadmin

<Directory /usr/share/phpmyadmin>
    Options FollowSymLinks
    DirectoryIndex index.php

    <IfModule mod_php5.c>
        <IfModule mod_mime.c>
            AddType application/x-httpd-php .php
        </IfModule>
        <FilesMatch ".+\.php$">
            SetHandler application/x-httpd-php
        </FilesMatch>

        php_flag magic_quotes_gpc Off
        php_flag track_vars On
        php_flag register_globals Off
        php_admin_flag allow_url_fopen Off
        php_value include_path .
        php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
        php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/
    </IfModule>
</Directory>

BTW, I have virtualmin on the server but I am installing the phpmyadmin at the root (so should work as a normal instalation, right?)

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
Dinis
  • 11
  • 1
  • 4

1 Answers1

0

SOLVED: the apache 000-default.conf should point directly to the IP,instead of having a '*':

<VirtualHost SERVER_IP:443>
        ServerAdmin webmaster@localhost
        ServerName my.server:443
        DocumentRoot /var/www/html
        DocumentRoot /usr/share/phpmyadmin
        SSLEngine on
        SSLCertificateFile  /etc/ssl/certs/ssl-cert-snakeoil.pem
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
Dinis
  • 11
  • 1
  • 4