-4

I have been working on a site for a while so I can get nice and safe before any one else sees it. I use XAMPP to help me with this. I recently noticed something changed on my site and I didn't make the change. Recently change after change after change. It is a localhost port 80 and I haven't touched it in a while. No one else uses this computer so now I am worried. Is local host secure? I know no one can see it on another computer right? I am worried because I don't want people to hack my private site.

System Specs:

Windows 8

Hp Pavillion Slimline 400

Hp Mouse and Keyboard.

Xampp newest version.

Control Panel: Xampp version 3.2.1

Nate32
  • 5
  • 2

1 Answers1

2

About XAMPP

Using the default port or not, safety is not only related to xampp, but also its own application.

Therefore port 80, just like any other, is safe since its application and validation are.

There is no such thing as: X port is unsafe and Y port is safe.

Solutions

You can do that with many ways:

In you PHP "master" class

if (!$_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR']){
  $this->output->set_status_header(400, 'No Remote Access Allowed');
  exit; //just for good measure
}

.htaccess

AuthName "bla"  
AuthType Basic  
<Limit GET POST>  
    order deny,allow  
    deny from all 
    allow from 127.0.0.1
    allow from <your-ip-here>
</Limit> 
Patrick Maciel
  • 4,874
  • 8
  • 40
  • 80