How to close access to local users to XAMPP(Linux)?

0 like 0 dislike
5 views
Welcome.

My OS GNU/Linux Mint.
~ $ uname-a Linux SpSystem 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux).


Installed XAMPP for Ubuntu( xampp-linux-x64-7.2.4-0-installer.run ). Everything works fine, but the Apache Server of XAMPP and resources available from the local network. It is not acceptable to me, as the local network of my apartment is full of other people's devices, including versed in it. I don't want them to have access to resources deployed on XAMPP: Watched as I develop the sites on the results of my work(privacy).

In order that the resources of XAMPP are not visible from the local network I ruled the httpd configuration file ( /opt/lamp/etc/httpd.conf). Changed parameters :

#AllowOverride none #Require all denied Order deny,allow Deny from all Allow from 127.0.0.1 #AllowOverride All #Order allow,deny #Allow from 127.0.0.1 


It gave the result: external local IP( Example: 192.168.0.110 . Permanent, local. ) the start page of XAMPP has become unavailable. But on 127.0.0.1(Internal IP) it is available, although localhost is also not available.(Browser: Ferefox, Chromium). Weird. Checked the hosts file(/etc/hosts): 127.0.0.1 localhost Entry there. PHP phpinfo gives. But PHPMyAdmin is not working. I understand because of the wrong host. So I replaced the host in /opt/lampp/phpmyadin/config.inc.php c localhost to 127.0.0.1 (the Crutch. Laughter). And of course PhpMyAdmin work it worked fine and when you restart XAMPP, but before you restart the OS. After restarting the OS it stopped working was to give: mysqli_real_connect(): (HY000/2002) (Two errors) and asked to verify the host name. Edit /opt/lampp/phpmyadin/config.inc.php (localhost to 127.0.0.1 and back) no longer helped.

In addition, I noticed that in Chromium XAMPP statr page is available only on 127.0.0.1, and localhost is unavailable in Firefox, XAMPP start page is available on localhost (Cntrl + R reload page) on 127.0.0.1. Very strange behavior.

Now I need XAMPP resources become inaccessible in the "external" network, and PhpMyAdmin to work without "crutches" and error.

Thank you for your attention.
by | 5 views

2 Answers

0 like 0 dislike
One of the Administrators of the official forum support just advised XAMPP in /opt/lamp/etc/httpd.conf to change the setting listen on 127.0.0.1:80. Which is essentially logical. Here is a simple solution. Then the server will listen to only one internal IP and all.

And settings Directory can be set to standard.
by
0 like 0 dislike
Order deny,allow
Deny from all
Allow from 127.0.0.1

This design is made inaccessible to your host from nowhere except himself. That is to go to your sites and PHPMyAdmin you can only with this machine. And more nowhere.
by

Related questions

0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
0 like 0 dislike
5 answers
0 like 0 dislike
3 answers
110,608 questions
257,186 answers
0 comments
33,901 users