luni, 22 august 2011

PHPMyAdmin Port Change

Here is the steps:
remove symlink to phpmyadmin.conf file
Code:
rm /etc/apache2/conf.d/phpmyadmin.conf
make apache listen on port 81 (or what ever you desire.)
Code:
sudo nano /etc/apache2/ports.conf
Add "Listen 81" to the file.
Code:
user@user:/etc/apache2$ cat ports.conf
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz

NameVirtualHost *:80
Listen 80
Listen 81

# SSL name based virtual hosts are not yet supported, therefore no
# NameVirtualHost statement here
Listen 443

Now create the vHost:
Code:
sudo vi /etc/apache2/sites-available/phpmyadmin
add the following to the file:
Code:

ServerName phpmyadmin
DocumentRoot /var/www-81

Enable the vHost:
Code:
sudo a2ensite phpmyadmin
Restart Apache:
Code:
sudo service apache2 restart
Create a symlink to the phpmyadmin directoy:
Code:
cd /var/www-81
sudo ln -s /usr/share/phpmyadmin/
At this point navigating to http://ip/phpmyadmin should not show the page. but http://ip:81/phpmyadmin should.

2 comentarii:

  1. doesn't work for me... tried your solution and this one
    http://ubuntuforums.org/showthread.php?t=1329607

    this one worked for me
    http://www.codeproject.com/Tips/801955/Running-phpMyAdmin-on-different-port

    RăspundețiȘtergere
  2. These instructions don't work for me. Have you any instructions for AWS EC2 Linux server?

    RăspundețiȘtergere