By tungvn0427
Hi everyone, I have a problem. I install phpmyadmin and I can access it from mydomain.com/phpmyadmin. Althought it’s OK, I want to access it from other port, like mydomain.com:9999/phpmyadmin. How should I do? Help me! Thanks a lot!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
phpMyAdmin is a web application, not a daemon. You will have to make your webserver listen on that port and then edit your vhosts so only that port has access to phpMyAdmin.
1.remove symlink to phpmyadmin.conf file
rm /etc/apache2/conf.d/phpmyadmin.conf
make apache listen on port 81
sudo nano /etc/apache2/ports.conf
NameVirtualHost *:80 Listen 80 Listen 81 <IfModule mod_ssl.c> # SSL name based virtual hosts are not yet supported, therefore no # NameVirtualHost statement here Listen 443 </IfModule>
3.Now create the vHost:
sudo vi /etc/apache2/sites-available/phpmyadmin
<VirtualHost *:81>
ServerName phpmyadmin
DocumentRoot /var/www-81
</VirtualHost>
4.Enable the vHost
sudo a2ensite phpmyadmin
5.restart the Apache
sudo service apache2 restart
Create a symlink to the phpmyadmin directoy: cd /var/www-81
sudo ln -s /usr/share/phpmyadmin/
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.