Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: phpmyadmin help
PostPosted: Thu Jan 06, 2011 4:14 pm 
Offline
Newbie

Joined: Sat Jan 01, 2011 2:53 pm
Posts: 4
I have Ubuntu 10.04 installed on my Linode, and am trying to put phpmyadmin on it. So I just ran
Code:
sudo apt-get install phpmyadmin
and went through the default installation steps. I see the apache.conf file in /usr/share/phpmyadmin, and everything looks right. But I have no idea where or how to access phpmyadmin now.

I have apache set up for virtual hosting, and already have a few websites hosted. Going to example.com/phpmyadmin doesn't work on any of them, and same thing when I go to my ip address /phpmyadmin.

So now I'm lost. If anybody could help that would be awesome. Thanks in advance!


Top
   
 Post subject:
PostPosted: Thu Jan 06, 2011 5:45 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
The default setting makes phpmyadmin inaccessible unless you take further steps, for the sake of security.

You'll need to copy the contents of the apache.conf file, and paste it into one of your virtual host files. If you want phpmyadmin to be accessible at your IP address, paste it into /etc/apache2/sites-available/default

But don't leave phpmyadmin accessible from the web after you're done with it. Disable it as soon as possible. It's a security risk.


Top
   
 Post subject: Re: phpmyadmin help
PostPosted: Thu Jan 06, 2011 5:54 pm 
Offline
Junior Member

Joined: Wed Jan 05, 2011 7:55 am
Posts: 29
Website: http://www.zeropointproductions.co.uk
Location: UK
kohnmd wrote:
I have Ubuntu 10.04 installed on my Linode, and am trying to put phpmyadmin on it. So I just ran
Code:
sudo apt-get install phpmyadmin
and went through the default installation steps. I see the apache.conf file in /usr/share/phpmyadmin, and everything looks right. But I have no idea where or how to access phpmyadmin now.

I have apache set up for virtual hosting, and already have a few websites hosted. Going to example.com/phpmyadmin doesn't work on any of them, and same thing when I go to my ip address /phpmyadmin.

So now I'm lost. If anybody could help that would be awesome. Thanks in advance!


I ran the install command and set the relevant user name and pass word for mysql.

Then went to my site address and placed " /phpmyadmin/ " on the end for example

http://www.yoursite.com/phpmyadmin/

This gave me the login screen for my php admin.

And yes as "hybinet" said you should disable it as of the security issues that it poses.


Top
   
 Post subject:
PostPosted: Thu Jan 06, 2011 8:50 pm 
Offline
Newbie

Joined: Sat Jan 01, 2011 2:53 pm
Posts: 4
Thanks to both of you for the responses! I did what hybinet suggested and pasted the contents of the apache.conf file into /etc/apache2/sites-available/default and it worked like a charm.

I only need it briefly from time-to-time, so it's no hassle to turn it on only as needed. I'll definitely take your advice and disable it at all other times.


Top
   
 Post subject:
PostPosted: Fri Jan 07, 2011 9:31 am 
Offline
Senior Member

Joined: Mon Dec 20, 2010 11:37 pm
Posts: 76
I do a symlink of apache.conf to /etc/apache2/conf.d/
Code:
ln -s /path/to/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf


Restart apache to load that config.


Top
   
 Post subject:
PostPosted: Fri Jan 07, 2011 2:45 pm 
Offline
Senior Member

Joined: Wed Jul 21, 2010 8:04 pm
Posts: 119
Another approach to securing PHPMyAdmin...

1. Restrict it to localhost in its Apache virtual host settings
2. Then, when you want to access PHPMyAdmin, SSH tunnel into your Linode
Code:
ssh -L 8080:localhost:80 yourusername@yourdomain.com

3. And type http://localhost:8080/phpmyadmin in your web browser

This approach requires being connected to your Linode via SSH to access PHPMyAdmin. If you have SSH keys, it's far less likely someone could hack into it then.


Top
   
 Post subject:
PostPosted: Thu Feb 10, 2011 10:32 am 
Offline
Junior Member

Joined: Wed Jan 05, 2011 7:55 am
Posts: 29
Website: http://www.zeropointproductions.co.uk
Location: UK
jzimmerlin wrote:
Another approach to securing PHPMyAdmin...

1. Restrict it to localhost in its Apache virtual host settings
2. Then, when you want to access PHPMyAdmin, SSH tunnel into your Linode
Code:
ssh -L 8080:localhost:80 yourusername@yourdomain.com

3. And type http://localhost:8080/phpmyadmin in your web browser

This approach requires being connected to your Linode via SSH to access PHPMyAdmin. If you have SSH keys, it's far less likely someone could hack into it then.


Live and learn... I did not know you could "tunnel" to it ! nice one I will give that a go some time soon. :)


Top
   
PostPosted: Thu Feb 10, 2011 1:04 pm 
Offline
Junior Member

Joined: Wed Jan 05, 2011 7:55 am
Posts: 29
Website: http://www.zeropointproductions.co.uk
Location: UK
kohnmd wrote:
Thanks to both of you for the responses! I did what hybinet suggested and pasted the contents of the apache.conf file into /etc/apache2/sites-available/default and it worked like a charm.

I only need it briefly from time-to-time, so it's no hassle to turn it on only as needed. I'll definitely take your advice and disable it at all other times.


Go to the following dir;
Code:
/etc/apache2/conf.d/


And comment out the Alias from the file
Code:
phpmyadmin.conf
, so it reads;
Code:
# Alias /phpmyadmin /usr/share/phpmyadmin


then use the following to reload your apache config;
Code:
/etc/init.d/apache2 reload


I think that does a global lockout rather than per site. :)


Top
   
 Post subject:
PostPosted: Thu Feb 10, 2011 1:57 pm 
Offline
Senior Member

Joined: Wed Jul 21, 2010 8:04 pm
Posts: 119
zppadmin wrote:
jzimmerlin wrote:
Another approach to securing PHPMyAdmin...

1. Restrict it to localhost in its Apache virtual host settings
2. Then, when you want to access PHPMyAdmin, SSH tunnel into your Linode
Code:
ssh -L 8080:localhost:80 yourusername@yourdomain.com

3. And type http://localhost:8080/phpmyadmin in your web browser

This approach requires being connected to your Linode via SSH to access PHPMyAdmin. If you have SSH keys, it's far less likely someone could hack into it then.


Live and learn... I did not know you could "tunnel" to it ! nice one I will give that a go some time soon. :)


Yes, it's a nice little trick. Wish I could take credit for thinking of it, but I learned it from someone else here on the forum.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group