Click here to Skip to main content
13,094,679 members (69,960 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 29 Jul 2014

Running phpMyAdmin on different port

, 29 Jul 2014
Rate this:
Please Sign up or sign in to vote.
Securing Your phpMyAdmin


I checked few tutorials on how to run phpMyAdmin on different port but they were a bit confusing for me since I do not work with apache that much. So I decided to write a newbie one.

Why do I want to do this? Well it's in my humble opinion more secure then allowing anyone to access your phpMyAdmin from well know path and public port.

How to?

First you need to remove phpMyAdmin config file /etc/apache2/conf-available/phpmyadmin.conf

rm /etc/apache2/conf-available/phpmyadmin.conf

or Include directive in apache config file /etc/apache2/apache2.conf

Include /etc/phpmyadmin/apache.conf


Then You need to add new listening port to Your ports.conf file located in /etc/apache2/ports.conf

Listen 8030

and new vhost with phpMyAdmin secret path to Your ports.conf file as well

<VirtualHost *:8030>
        Alias /SecretPathTophpMyAdmin /usr/share/phpmyadmin


After You need to reload apache configuration by issuing following command

service apache2 reload


Now You can access your phpMyAdmin only on port 8030 with custom path


As You can see its not ppssible to access phpMyAdmin on port 80 with custom and default path nor on port 666 with default path (I used port 666 instead of port 8030 in my configuration)


But it is possible to access it on port 666 with custom path :)

Other articles that may be useful



  • 07/29/2014 - First published.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Marin Cokarić
Systems / Hardware Administrator Cro-bit Ltd.
Croatia Croatia
I'm a PC Technician by profession, currently studying computing at Univeristy of Split, FESB
If you wish to contact me you may do so by LinkedIn on

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170813.1 | Last Updated 29 Jul 2014
Article Copyright 2014 by Marin Cokarić
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid