phpmyadmin port change?

Rajat asked:

How do i change my default phpmyadmin port to 443 or 9999? Is it possible or do I have use port 80 only? If possible, then how do I change share the same?

Apache is listening on port 9999 for sure. However, going to URL


Will give following error (with Firefox browser)

An error occurred during a connection to webserver:9999.

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)

Anyone has any clue what is going on?

My answer:

If you want to run phpMyAdmin on a non-standard port, it should autodetect the URL and port number you’ve chosen in your web server configuration. Since you don’t mention which web server you use, consult its documentation to see how to set up the web server to listen on a non-standard port.

If for some reason phpMyAdmin doesn’t detect them correctly, you can override it by setting the PmaAbsoluteUri directive to whatever the URL should be.

(You may also combine this with the ForceSSL directive as shown in @TheDigitalNinja’s answer, and any other directives you may need to use.)

For example:

$cfg['PmaAbsoluteUri'] = '';

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.