XAMPP services in localhost only

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

XAMPP services in localhost only

Postby gglazer » 14. December 2008 19:38

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
gglazer
 
Posts: 2
Joined: 14. December 2008 19:33

Re: XAMPP services in localhost only

Postby glitzi85 » 14. December 2008 20:34

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

Re: XAMPP services in localhost only

Postby gglazer » 14. December 2008 21:03

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
gglazer
 
Posts: 2
Joined: 14. December 2008 19:33

Re: XAMPP services in localhost only

Postby manna1111 » 06. January 2009 02:02

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?
manna1111
 
Posts: 8
Joined: 06. January 2009 01:29

Re: XAMPP services in localhost only

Postby Sharley » 06. January 2009 02:17

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.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: XAMPP services in localhost only

Postby manna1111 » 06. January 2009 02:32

Oh yes, thank you I did find it and completed the above stated process:)
Thanks!
Amanda
manna1111
 
Posts: 8
Joined: 06. January 2009 01:29

Re: XAMPP services in localhost only

Postby apfrdalo » 16. February 2019 21:14

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.
apfrdalo
 
Posts: 1
Joined: 16. February 2019 21:09
XAMPP version: 7.2.13
Operating System: Windows 7 Professional 64-bit

Re: XAMPP services in localhost only

Postby Nobbie » 16. February 2019 23:09

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.
Nobbie
 
Posts: 13179
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 203 guests