Page 1 of 1

XAMPP services in localhost only

PostPosted: 14. December 2008 19:38
by gglazer
Hi,

I'm very new at web development and while I learn and play, I'd like to work on my desktop (XP) only. So, I installed Apache, mySQL, FTP, PHP and Perl using XAMPP basic. Everything works fine, but I am concerned about random attempts to bust my firewall and use my install as some kind of bot server. Is there a quick way to set each of the servers to respond to requests from localhost only?

Much obliged,

Glenn

Re: XAMPP services in localhost only

PostPosted: 14. December 2008 20:34
by glitzi85
Apache:
1) Open file xampp\apache\conf\httpd.conf and replace
Code: Select all
Listen 80
with
Code: Select all
Listen 127.0.0.1:80

2) Open file xampp\apache\conf\extra\httpd-ssl.conf and replace
Code: Select all
Listen 443
with
Code: Select all
Listen 127.0.0.1:443


MySQL:
Open file xampp\mysql\bin\my.cnf (drag&drop in notepad) and put in
Code: Select all
bind-address=localhost

directly after [mysqld] (NOT [mysql]!)

FTP: Just don't use it. Binding an FTP-Server to localhost would be somehow senseless.

glitzi

Re: XAMPP services in localhost only

PostPosted: 14. December 2008 21:03
by gglazer
Thanks, Glitzi, for the fast and great response. Easy to follow and appears to work fine (reloaded my own pages and they work).

As for FTP, well, yeah, I suppose it depends on how much you hate/like the Windows file interface. :wink: But really, I just included everything I installed for completeness.

Best,

Glenn

Re: XAMPP services in localhost only

PostPosted: 06. January 2009 02:02
by manna1111
glitzi85 wrote:Apache:
1) Open file xampp\apache\conf\httpd.conf and replace
Code: Select all
Listen 80
with
Code: Select all
Listen 127.0.0.1:80

2) Open file xampp\apache\conf\extra\httpd-ssl.conf and replace
Code: Select all
Listen 443
with
Code: Select all
Listen 127.0.0.1:443


MySQL:
Open file xampp\mysql\bin\my.cnf (drag&drop in notepad) and put in
Code: Select all
bind-address=localhost

directly after [mysqld] (NOT [mysql]!)

FTP: Just don't use it. Binding an FTP-Server to localhost would be somehow senseless.

glitzi


I wanted some extra security and started following your instructions. i completed the first two instructions however when I went to xampp\mysql\bin\ I did not see a "my.cnf" folder. Do you know why I do not have this? How can i get it? This is the second folder I could not find. I also do not have a HOSTS folder in my WIndows folder..hmmm?

Re: XAMPP services in localhost only

PostPosted: 06. January 2009 02:17
by Sharley
went to xampp\mysql\bin\ I did not see a "my.cnf" folder.
You will have what looks like a shortcut called simply my.

Drag this file into notepad or your favorite text editor for reading and editing.

Re: XAMPP services in localhost only

PostPosted: 06. January 2009 02:32
by manna1111
Oh yes, thank you I did find it and completed the above stated process:)
Thanks!
Amanda

Re: XAMPP services in localhost only

PostPosted: 16. February 2019 21:14
by apfrdalo
On my Windows, the MySQL conf file is C:\Servers\xampp\mysql\bin (because I installed XAMPP to the Servers folder).

I discovered this by opening the XAMPP Control Panel (v3.2.2) from the Start menu, then clicking the Config button on the MySQL line and selecting my.ini.

I don't know why it's named different on Windows; seems unnecessary.

Re: XAMPP services in localhost only

PostPosted: 16. February 2019 23:09
by Nobbie
apfrdalo wrote:I don't qknow why it's named different on Windows; seems unnecessary.


Seems. Seems you lack windows knowledge. Unfortunately Microsoft already gave away *.cnf for Windows configuration, if you rename my.ini to my.cnf, you will see that you cannot open it in Explorer for editing. Give it a try and you will understand.