Localhost

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Localhost

Postby xiownthisplacex » 17. November 2008 12:57

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.
xiownthisplacex
 
Posts: 6
Joined: 17. November 2008 12:53

Postby glitzi85 » 17. November 2008 13:19

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!
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Postby xiownthisplacex » 17. November 2008 13:30

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 :/
xiownthisplacex
 
Posts: 6
Joined: 17. November 2008 12:53

Postby glitzi85 » 17. November 2008 13:37

What OS are you using on your Workstation? And what SSH-Software are you using to connect to the server?

glitzi
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Postby xiownthisplacex » 17. November 2008 16:06

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..
xiownthisplacex
 
Posts: 6
Joined: 17. November 2008 12:53

Postby glitzi85 » 17. November 2008 17:19

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
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim

Postby xiownthisplacex » 17. November 2008 17:38

i just tried that a couple of times, but i keep on getting this :/
Image
xiownthisplacex
 
Posts: 6
Joined: 17. November 2008 12:53

Postby xiownthisplacex » 17. November 2008 23:22

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?
xiownthisplacex
 
Posts: 6
Joined: 17. November 2008 12:53

Postby glitzi85 » 17. November 2008 23:58

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
User avatar
glitzi85
 
Posts: 1920
Joined: 05. March 2004 23:26
Location: Dahoim


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 10 guests