Page 1 of 1
Localhost
Posted:
17. November 2008 12:57
by xiownthisplacex
Hey everyone.
I have xampp installed, and i wanted to know if I can make phpymyadmin accessible only via localhost, so then i can tunnel in via ssh, so that it is more secure like this because no one can then access my database.. Any help? Thanks in advance.
Posted:
17. November 2008 13:19
by glitzi85
Open the File /opt/lampp/etc/extra/httpd-xampp.conf and change this:
- Code: Select all
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
</Directory>
into this:
- Code: Select all
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from localhost
</Directory>
glitzi
Edit: And don't forget to restart Apache!
Posted:
17. November 2008 13:30
by xiownthisplacex
thanks. nice, now it is not available to others..
but, how can i access phpmyadmin now?
someone told me to tunnel it via ssh, but i dont know how :/
Posted:
17. November 2008 13:37
by glitzi85
What OS are you using on your Workstation? And what SSH-Software are you using to connect to the server?
glitzi
Posted:
17. November 2008 16:06
by xiownthisplacex
im using windows xp on my pc..
server os is centos 5
and i use putty to ssh and like winscp or ftprush for ftp..
Posted:
17. November 2008 17:19
by glitzi85
OK, in Putty you do it in this way:
Start Putty, type in your Server Name and then select from the Menu on the left hand side Connection -> SSH -> Tunnels. Then fill in this values:
- Code: Select all
Source-Port: 8080
Destination: localhost:80
Now Click the Add-Button. The Tunnel should appear in the list like this:
- Code: Select all
L8080 localhost:80
Now connect to your Server and log on. Now keep the Putty-Session open and start your Webbrowser. You should be able to connect to
http://localhost:8080/phpmyadmin
glitzi
Posted:
17. November 2008 17:38
by xiownthisplacex
i just tried that a couple of times, but i keep on getting this :/
Posted:
17. November 2008 23:22
by xiownthisplacex
ok, nevermin, i got it working :p
i had forgot to mention that my server has 2 IP's.
so in httpd-xampp.conf, instead of localhost, i put the IP which xampp is binded too, restarted xampp, in the tunnel i put the IP:80 instead of localhost:80 and it works now..
thanks for the help!
ps: this way is a lot more secure right?
Posted:
17. November 2008 23:58
by glitzi85
xiownthisplacex wrote:ps: this way is a lot more secure right?
No, if you bind PMA to an External-IP(!) then this is kind of senseless.
You have to bind XAMPP to localhost also (simply put Listen localhost into the httpd.conf). Then do it again as i posted before.
glitzi